Copy workbook to another location without opening

leeloo0505

Board Regular
Joined
Mar 28, 2003
Messages
130
Hello,
I am trying to copy a workbook without opening it and save it to a different location/file name (2nd workbook) from a third workbook.
Anybody got any ideas?
Thanks,
leeloo
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
ok that part works great. A issue im having now is that the FileCopy file Master Archive(GROUP)TEST.xls is password protected so obviesly the Destination File (Public)Archive.xls is also. Is there something hat could be added where the Destination file is not password protected ? Thanks for your Help

On Error Resume Next
Kill "H:\All\Material Prep Archive\(Public)Archive.xls"
On Error GoTo 0
On Error Resume Next
FileCopy Source:="H:\Burney Table\HYPERLINK TEST\HYPO ARCHIVE\Master Archive(GROUP)TEST.xls", Destination:="H:\All\Material Prep Archive\(Public)Archive.xls"
 
Upvote 0
Sorry, I don't know how to do that (I don't think it is possible using FileCopy).
 
Upvote 0
ok, how about a open event in the destination file that will password.unprotect when the workbook is opened ?
 
Upvote 0
Try like this

Code:
Private Sub Workbook_Open()
Me.Unprotect Password:="xyz"
End Sub
 
Upvote 0
I have alot of hyperlinks in the FileCopySource "Master Archive(Group)Test.xls" I noticed that they do not work in the Destination "(Public)Archive.xls".
Do you have a idea on what I can do to fix this. Thanks
 
Upvote 0
I assume that they no longer point to the correct destination. I do not know how to fix that, sorry.
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,427
Members
448,961
Latest member
nzskater

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