can you create a full copy of an open workbook (eg. activeworkbook MyFile.xls) using VBA, with the new copy (eg Book1.xls) open as well ,without having to save a copy first then open it ?
can you create a full copy of an open workbook (eg. activeworkbook MyFile.xls) using VBA, with the new copy (eg Book1.xls) open as well ,without having to save a copy first then open it ?
You can create a copy of an open workbook...
![]()
Please Login or Register to view this content.
Wait a sec... looking back at your questions...
Are you saying you want to create a copy of open workbook "A" to workbook "B" with workbook "B" being open as well? If that's the case, then no. At least not to my knowledge.
Yes, that is it exactly.
I was aware of SavesCopyAs.
But want to avoid having to open the copy if possible, due to large filesize and time to do so.
Not sure if it can be done, but thats what i want if it can be.
Thanks
Let me make sure I understand correctly. You have Workbook "A" which you want to edit a copy of (Workbook "B")? So you want to create Workbook "B" without having to open Workbook "A"?
Or am I way off?
To clarify -
Workbook "A" is the original source workbook (open - contains VBA)
Execute a macro in Workbook "A" to create a copy of Workbook "A" (Workbook "A" to remain open)
The copy of Workbook "A" will be Workbook "B".
I want Workbook "B" to be open also.
Rather than CopySaveas of Workbook "A" then open workbook "B".
I hope this makes it clear.
Thanks
Ah! Much clearer. Here you go.
This will create a copy of your current workbook. It will then open the copy, keeping the original workbook open as well.![]()
Please Login or Register to view this content.
Is this what you were looking for?
Thanks.
Is there no way of creating an open copy, without the savecopyas first ?
To save on the open up tiem of the copy ?
Ok, I think I'm missing something here (tough part about the written word, I guess LOL).
You have "A" open and want to create a copy of it, calling that copy "B". Once "B" is made, you want "B" to be opened. "A" will remain open as well. Is that accurate so far?
Or, are you trying to open a blank workbook from "A" and saving "B" to that blank workbook once it's open?
Wb A is the current active open workbook (contains VBA).
A macro in Wb A is run to create an open copy of Wb A.
The open copy is B.
I dont want to have to create Wb B (by SaveCopyAs of Wb A) then open it.
I want the copy of Wb A (Wb B to be created as an open copy)
Further macros will be run on A and B as required.
Eventually B then A will be closed as required.
I hope this is clear.
Thanks.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks