shelbsassy
New Member
- Joined
- Sep 4, 2009
- Messages
- 5
Hello,
I am very new to VBA and I have a module to save a file with a static name and the current date. I want to be able to click the red x and run the module. Is there a way to do that? Currently I am using a shortcut to run the module but when I click the x I would like to activate the module to save the file with a new name.
My code is
Sub filesave()
ActiveWorkbook.SaveAs ("L:\Regulatory Reporting\LOBs\MLTSS\MLTSS Reports Deliverables\MLTSS REPORT FOLDERS\Ad Hoc\Incomplete Assessments\Reports\Incomplete Assessments 2023\SNP_MLTSS_Incomplete_Assessments_" & Format(Now(), "MMDDYYYY") & ".xlsm")
End Sub
Thank you for any help.
I am very new to VBA and I have a module to save a file with a static name and the current date. I want to be able to click the red x and run the module. Is there a way to do that? Currently I am using a shortcut to run the module but when I click the x I would like to activate the module to save the file with a new name.
My code is
Sub filesave()
ActiveWorkbook.SaveAs ("L:\Regulatory Reporting\LOBs\MLTSS\MLTSS Reports Deliverables\MLTSS REPORT FOLDERS\Ad Hoc\Incomplete Assessments\Reports\Incomplete Assessments 2023\SNP_MLTSS_Incomplete_Assessments_" & Format(Now(), "MMDDYYYY") & ".xlsm")
End Sub
Thank you for any help.