VinceF
Board Regular
- Joined
- Sep 22, 2007
- Messages
- 199
- Office Version
- 2016
- Platform
- Windows
Greetings..
I've used this code in another workbook for golf and I'm trying to use the code for a bowling workbook. For reason(s) unknown to me I simply cannot get it to work and I've tried everything my limited skills allow...help please.
I created a Active X Control Box and tried to put the code in there but....it's just not working.
Sub SaveWithTodaysDate()
ActiveWorkbook.SaveAs ("C:\Bowling\2024-25\" & ThisWorkbook.Sheets("Scores").Range("Ar3").Value & ".xlsm")
End Sub
The worksheet name is CAM BOWLING and it's located C:\Bowling I'm trying to get it to save a copy with todays date in C:\Bowling\2024-25\
Sheet name is "Scores" and Cell "AR3" is a formula showing today's date. I do have VBA code to "RESET" the sheet...see below..
Thank You
VinceF
Office 2016
Code that Resets the sheet
Private Sub CommandButton1_Click()
Dim warning
warning = MsgBox(Range("A1").Value & " THIS WILL RESET THE ENTIRE SHEET. Select OK to continue or select CANCEL to continue without resetting", vbOKCancel, " THIS WILL RESET THE ENTIRE SHEET")
If warning = vbCancel Then Exit Sub
On Error Resume Next
Sheets("Scores").Range("C5:W33").SpecialCells(xlCellTypeConstants).ClearContents
Sheets("Scores").Range("AG5:AI33").SpecialCells(xlCellTypeConstants).ClearContents
MsgBox "THE FORM HAS BEEN RESET."
End Sub
I've used this code in another workbook for golf and I'm trying to use the code for a bowling workbook. For reason(s) unknown to me I simply cannot get it to work and I've tried everything my limited skills allow...help please.
I created a Active X Control Box and tried to put the code in there but....it's just not working.
Sub SaveWithTodaysDate()
ActiveWorkbook.SaveAs ("C:\Bowling\2024-25\" & ThisWorkbook.Sheets("Scores").Range("Ar3").Value & ".xlsm")
End Sub
The worksheet name is CAM BOWLING and it's located C:\Bowling I'm trying to get it to save a copy with todays date in C:\Bowling\2024-25\
Sheet name is "Scores" and Cell "AR3" is a formula showing today's date. I do have VBA code to "RESET" the sheet...see below..
Thank You
VinceF
Office 2016
Code that Resets the sheet
Private Sub CommandButton1_Click()
Dim warning
warning = MsgBox(Range("A1").Value & " THIS WILL RESET THE ENTIRE SHEET. Select OK to continue or select CANCEL to continue without resetting", vbOKCancel, " THIS WILL RESET THE ENTIRE SHEET")
If warning = vbCancel Then Exit Sub
On Error Resume Next
Sheets("Scores").Range("C5:W33").SpecialCells(xlCellTypeConstants).ClearContents
Sheets("Scores").Range("AG5:AI33").SpecialCells(xlCellTypeConstants).ClearContents
MsgBox "THE FORM HAS BEEN RESET."
End Sub