copy file automatically when open

ctz

New Member
Joined
Aug 21, 2008
Messages
26
hi all,I just want to know..its possible to copy file in a folder A and paste it in folder B? it run automatically
the situation is like this..when I open folder A , and I open the file which in there in a meantime it copy the file and paste it in new path/folder without notice by user..can i? possible?
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Yes but it does require the user to Enable Macros when they open the first file (if they disable macros then the file won't get copied). Place the following in the ThisWorkbook module of the file in question:

Code:
Private Sub Workbook_Open()
ThisWorkbook.SaveCopyAs "C:\test\" & ThisWorkbook.Name  'amend path as appropriate
End Sub

To access the ThisWorkbook module, with the file open in Excel right-click on the little Excel file icon to the left of the File menu. Select View Code.
 
Upvote 0

Forum statistics

Threads
1,216,130
Messages
6,129,058
Members
449,484
Latest member
khairianr

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