tcorcoran15
New Member
- Joined
- Feb 16, 2017
- Messages
- 22
Hi All,
I have the following macro which works fine, however I would like to expand on it if possible.
I would like the macro to create a file with the date if possible, where the file is then saved.
Potential issue is that I may be running the macro multiple times in a day so I imagine it would need to check whether there is already a folder with today's date? I'm no expert haha.
Any help is greatly appreciated.
I have the following macro which works fine, however I would like to expand on it if possible.
I would like the macro to create a file with the date if possible, where the file is then saved.
Potential issue is that I may be running the macro multiple times in a day so I imagine it would need to check whether there is already a folder with today's date? I'm no expert haha.
Any help is greatly appreciated.
Code:
Application.DisplayAlerts = False ' suppress overwrite warning message ActiveWorkbook.SaveAs Filename:="X:\Crown Gas & Power\MATRIX\Matrix - Live\Reports\Credit Control Files\" & RemovePunctuation(Range("D2")), _
FileFormat:=51, _
CreateBackup:=False
Application.DisplayAlerts = True
ActiveWorkbook.Close SaveChanges:=False