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

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
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
 
Upvote 0

Forum statistics

Threads
1,215,059
Messages
6,122,917
Members
449,093
Latest member
dbomb1414

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