VinceF
Board Regular
- Joined
- Sep 22, 2007
- Messages
- 199
- Office Version
- 2016
- Platform
- Windows
Greetings,
Hopefully a simple fix.
Is it possible to combine 2 scripts to 1 command button, if so your assistance would be very much appreciated.
Script 1 saves the workbook with the value on the MAIN sheet, in cell AA3
Script 2 adds "1" to the value in cell AA3 when saving and closing the workbook
Script 1
Sub SaveWithTodaysDate()
ActiveWorkbook.SaveAs ("C:\Golf\Indianwood Quota - Skins\Results\" & ThisWorkbook.Sheets("Main").Range("AA3").Value & ".xlsm")
End Sub
Script 2
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Range("AA3") = Range("AA3") + 1
End Sub
Thank You,
VinceF
Excel 2016
Hopefully a simple fix.
Is it possible to combine 2 scripts to 1 command button, if so your assistance would be very much appreciated.
Script 1 saves the workbook with the value on the MAIN sheet, in cell AA3
Script 2 adds "1" to the value in cell AA3 when saving and closing the workbook
Script 1
Sub SaveWithTodaysDate()
ActiveWorkbook.SaveAs ("C:\Golf\Indianwood Quota - Skins\Results\" & ThisWorkbook.Sheets("Main").Range("AA3").Value & ".xlsm")
End Sub
Script 2
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Range("AA3") = Range("AA3") + 1
End Sub
Thank You,
VinceF
Excel 2016