andrewb90
Well-known Member
- Joined
- Dec 16, 2009
- Messages
- 1,077
Hi all,
Basically, I need VBA to create a copy of my workbook (equivalent to press F12). The name would be the same with the added (view only) in the name, and the file path would be the same.
When I used the recorder I got this:
I just need help making the filename match whatever computer is being used, and the filename to just adjust.
Any help would be greatly appreciated.
Basically, I need VBA to create a copy of my workbook (equivalent to press F12). The name would be the same with the added (view only) in the name, and the file path would be the same.
When I used the recorder I got this:
Code:
ChDir "C:\Users\AB\Desktop" ActiveWorkbook.SaveAs Filename:="C:\Users\AB\Desktop\Q_Stats(viewonly).xlsm" _
, FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
I just need help making the filename match whatever computer is being used, and the filename to just adjust.
Any help would be greatly appreciated.