So Guys I have this excel macro enabled document everything works fine.
In the document I had 5 tabs/Worksheets. My boss asked if we can delete the instructions worksheet and basically have another excel file in the folder where we can edit those instructions and so everytime user opens the main file that instructions tab will get copied over on open event.
So basically Importing Worksheet from a Closed Workbook.
Now when I do this. This code works perfectly. This will move worksheet when run or delete work sheet when run.
I put these two Sub's in 2 different modulesPlease Login or Register to view this content.
Then I went to ThisWorkbook under Visual basic and on the open event I typed in the following
So basically if instructions tab exist then delete it and the second one will copy it over from other workbook.Please Login or Register to view this content.
After doing this. I save and reopen the file everything is still working fine but then Once I try to SAVE the main file I get this error.
error1.jpg
When I click Continue it pops up the SAVE AS when I click Save I get
error1.jpg
When I click Ok on that I get
error1.jpg
Please help me with this. Why is this error coming up what am I doing wrong. I checked the whole file before entering this code in that deletes and moves over a sheet from workbook. IT WORKS PERFECTLY FINE. Right when I enter this code it starts to do this. Please it's very urgent.
Thanks.
Bookmarks