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

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
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,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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