Is there a VBA code that will allow me to close the sheet i am working on and then reopen the original from my desktop.
Is there a VBA code that will allow me to close the sheet i am working on and then reopen the original from my desktop.
Yes, but more detail is needed.
What do you mean by "original"? Is the one you are working on and want to close a copy of the original? If so, how can you determine the name of the original?
Best i can put it is I open the original but then it automatically is remanem according to info in a certain cell. so what i want to do is when i hit my command button i want it to close the current one i am working on which has been renamed and then open the original off the desktop
Something like this maybe?
Please Login or Register to view this content.
BTW your Command Button and code will have too reside in another workbook and not the activeworkbook.
so there is no way to do it using the command button in my current workbook?
If your current workbook is the one housing the macro once you close it automatically, the macro will stop. You can't reopen it from the same macro.
Last edited by JOHN H. DAVIS; 10-22-2013 at 12:55 PM.
ok then can i just set the macro to just close it, and i can have them open the new one manually
I have not prototyped this but surely the code can open the other workbook first, then close itself.
how do i write it.
I've reviewed the thread again and think this solution is a bit cleaner: Save a copy of the current workbook with a new name, and leave the current workbook open. The workbook with the new name is never opened.
You would have to modify it to give the desired filename using the content of the desired cell.Please Login or Register to view this content.
Last edited by 6StringJazzer; 10-23-2013 at 12:53 PM. Reason: added ThisWorkbook qualifier to avoid any ambiguity
Batch choochoo.xlsso i put this in the below workbook, but it is not saving it to the drive and file written in the macro
It works. You didn't give any detail so I couldn't write code to match your situation, and you didn't modify the code. You have the following code:
Modify it to look like this.Please Login or Register to view this content.
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks