Hello everyone,
I know this will be a very basic question but I cannot figure out the issue.
I have two workbooks and I am trying to copy a work sheet ("2021-02-02") from Book1 ("Compare Data.xlsm") to another workbook ("Archive.xlsx") after the only sheet ("Main Sheet"). All the VBA is in Book1 ("Compare Data.xlsm")
An extract of the code is as follows:
I have tried dimensioning the workbooks and no success.
I have ensured that the Marco Security for the folder is enabled.
Any assistance would be grateful.
Regards
Vonryan
I know this will be a very basic question but I cannot figure out the issue.
I have two workbooks and I am trying to copy a work sheet ("2021-02-02") from Book1 ("Compare Data.xlsm") to another workbook ("Archive.xlsx") after the only sheet ("Main Sheet"). All the VBA is in Book1 ("Compare Data.xlsm")
An extract of the code is as follows:
Code:
Application.ScreenUpdating = False
Sheets("2021-02-02").Select
Sheets("2021-02-02").Copy After:=Workbooks("C:\Datasheets Compare\Archive.xlsx").Sheets("Main Sheet")
Application.ScreenUpdating = True
I have tried dimensioning the workbooks and no success.
I have ensured that the Marco Security for the folder is enabled.
Any assistance would be grateful.
Regards
Vonryan
Last edited by a moderator: