Save Workbook in particular folder.

kris01

New Member
Joined
May 29, 2019
Messages
9
Hello.

I wish to save a new copy of my workbook as a .xls file into a particular folder using a new filename using current day logic.

My current file is a .xlsm file.

The filename I wish to save as:

101 My P&L 28 May 2019

The underlined parts of my filename need to update everyday.

The 101 is based of a workday formula I currently have on a sheet called 'Control' Cell I8.

The date is also based of a formula i have on the same sheet cell I4

I want to keep my original file open and the filename to remain the same as before.

The path I wish to save down to is...

N:\My Documents\

Any ideas as my code doesn't seem to work....

ub Saveworkbookset()




Dim Thiswb As Workbook
Set Thiswb = ActiveWorkbook
Workbooks.Add


myfilename = mypath & wrkday & " Daily Revenue " & Format(Date, "dd mm yyyy") & "_KM.xlsm"
Debug.Print myfilename
ActiveWorkbook.SaveCopyAs




End Sub
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Forum statistics

Threads
1,223,902
Messages
6,175,278
Members
452,629
Latest member
SahilPolekar

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