Hello,
I am using the sub below to send out a single sheet to a new workbook on our network drive, in effect making a "back-up" copy for auditors to review. It works great but I always get the pop-up asking me if I want to make it macro free or enabled. Ideally it would be macro free, but I can live with either option, I just do not want the pop-up to appear anymore. Going through the macro recorder I cannot seem to figure out what syntax I need to default this to macro-free. Can anyone guide me on this one?
Also, our company folder protocol is date_file name, but as you can see on the sub I have it as filename_date, I am tanking on flipping those around as well. Putting the date stamp syntax in front did not work, or I used the wrong syntax. Any help on that would be appreciated as well - many thanks.
I am using the sub below to send out a single sheet to a new workbook on our network drive, in effect making a "back-up" copy for auditors to review. It works great but I always get the pop-up asking me if I want to make it macro free or enabled. Ideally it would be macro free, but I can live with either option, I just do not want the pop-up to appear anymore. Going through the macro recorder I cannot seem to figure out what syntax I need to default this to macro-free. Can anyone guide me on this one?
Also, our company folder protocol is date_file name, but as you can see on the sub I have it as filename_date, I am tanking on flipping those around as well. Putting the date stamp syntax in front did not work, or I used the wrong syntax. Any help on that would be appreciated as well - many thanks.
Code:
Sub ExportReport()
'
' ExportReport Macro
'
Dim wb As Workbook
Sheets("Emergency Lighting Log").Copy
Set wb = ActiveWorkbook
With wb
.SaveAs "N:\Facilities\DeptData\EH&S\Compliance and EHS\Facilities Inspections\Emergency Lighting\Emergency Lighting Report " & Format(Now, "yy_mmdd") & ".xlsx"
'.Close False
End With
End Sub