Button to save the template workbook to a default directory

JayDii

New Member
Joined
Dec 22, 2008
Messages
2
Hi all!
This has probably been posted and answered before. I found some similar questions and good answers, but I couln't figure out how to make this work...

I have an excel template that I use once a week, for processes and so on... Anyway I'll "save as" the template in the same directory every week and the name as that current date.
The directory is under a tree with many many braches... Therefore I would like to create a button on the template that automates this, saving in that directory and as the current date...

Can anyone show me a VB-script that can do this for an excel template?
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Datsmart

Well-known Member
Joined
Jun 19, 2003
Messages
7,985
This will create/over-write a copy as a new file within the listed filename and path.
Original WorkBook will remain active.
Code:
        WBName = "MyTemplate.xlt"
        Dpth = "C:\groups\SDO\NSDG\KS-CL\Analytics\CX"
        pth = Dpth & "\" & WBName
        ActiveWorkbook.SaveCopyAs Filename:=pth
 

Watch MrExcel Video

Forum statistics

Threads
1,133,271
Messages
5,657,765
Members
418,412
Latest member
fehr56

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
Top