Create a seperate read only instance of a workbook already opened

bradyboyy88

Well-known Member
Joined
Feb 25, 2015
Messages
562
I am at a standstill and hoping to get some help. I am trying to create a subroutine that opens up a separate instance of a workbook that is already open. I can create the excel object to start the second instance but I am not sure the best way create the clone instance of the workbook that is open. Basically the file is located on a extremely slow network drive so using workbook open with the file path is far to slow in my mind. Is there a way to create a clone without having to fetch the original file but instead just pull from the file that is open in memory?

Thanks
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Maybe something like this...
Code:
Dim Ofsobj as Object
Set Ofsobj = CreateObject("Scripting.FilesystemObject")
Ofsobj.CopyFile ThisWorkbook.FullName, _
     ThisWorkbook.Path & "\" & "CLONE" & ThisWorkbook.Name, True
Set Ofsobj = Nothing
This copies the open wb that you're currently using to a new "CLONE" wb in the same directory... which is not what U want but U can use the copyfile method to copy the open wb that your after into a new wb at whatever directory U specify. So, just adjust the code to specify the file paths U want and it seems like it should work. HTH. Dave
 
Upvote 0
I do not want to save the second instance just open in memory for using it independently of the first instance. Wouldnt copyfile() be saving to the slow network drive hence almost similar performance issues as just reopening the second instance from the network. Thank you for the solution but I do not think it would solve the problem :(
 
Upvote 0

Forum statistics

Threads
1,215,704
Messages
6,126,321
Members
449,308
Latest member
Ronaldj

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top