Matt Young
New Member
- Joined
- Nov 2, 2018
- Messages
- 8
- Office Version
- 365
- Platform
- Windows
Hi guys.
I have bit of code that clears a sheet, before it does that I have it save to another location (just incase the user pressed the wrong button), my question is, is there a way to notify the user hat the save is succesful before thy carry on? Here is hat I have already.
If MsgBox("WARNING,YOU ARE ABOUT TO DELETE ALL OF THE BACKUP ENTRIES." & vbNewLine & "" & vbNewLine & "Click YES to continue or NO to abort", vbYesNo + vbExclamation) = vbYes Then
MsgBox "This Spreadsheet will now be saved", vbOKOnly + vbInformation
ActiveWorkbook.SaveCopyAs Filename:="C:\backup\backup spreadsheet\AutoSave\Device Backup Spreadsheet backup" & Format(Now(), "mm-dd-yy, hh.mm.ss") & ".xlsm"
This is where I want to notify te user that the save has completed
Range("C4:C15").Select
Selection.ClearContents
Range("E4:E15").Select
Selection.ClearContents
Range("F4:F15").Select
Selection.ClearContents
Range("C17:C22").Select
Selection.ClearContents
Range("E17:E22").Select
Selection.ClearContents
Range("F17:F22").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=12
Range("C25:C27").Select
Selection.ClearContents
Range("E25:E28").Select
Selection.ClearContents
Range("F25:F28").Select
Selection.ClearContents
Range("F29:F35").Select
Selection.ClearContents
Range("E29:E35").Select
Selection.ClearContents
Range("C29:C35").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-24
Range("C4").Select
Else
End If
ActiveSheet.Range("C4").Select
Application.ScreenUpdating = True
ActiveSheet.Protect
End Sub
Any help here would be great
I have bit of code that clears a sheet, before it does that I have it save to another location (just incase the user pressed the wrong button), my question is, is there a way to notify the user hat the save is succesful before thy carry on? Here is hat I have already.
If MsgBox("WARNING,YOU ARE ABOUT TO DELETE ALL OF THE BACKUP ENTRIES." & vbNewLine & "" & vbNewLine & "Click YES to continue or NO to abort", vbYesNo + vbExclamation) = vbYes Then
MsgBox "This Spreadsheet will now be saved", vbOKOnly + vbInformation
ActiveWorkbook.SaveCopyAs Filename:="C:\backup\backup spreadsheet\AutoSave\Device Backup Spreadsheet backup" & Format(Now(), "mm-dd-yy, hh.mm.ss") & ".xlsm"
This is where I want to notify te user that the save has completed
Range("C4:C15").Select
Selection.ClearContents
Range("E4:E15").Select
Selection.ClearContents
Range("F4:F15").Select
Selection.ClearContents
Range("C17:C22").Select
Selection.ClearContents
Range("E17:E22").Select
Selection.ClearContents
Range("F17:F22").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=12
Range("C25:C27").Select
Selection.ClearContents
Range("E25:E28").Select
Selection.ClearContents
Range("F25:F28").Select
Selection.ClearContents
Range("F29:F35").Select
Selection.ClearContents
Range("E29:E35").Select
Selection.ClearContents
Range("C29:C35").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-24
Range("C4").Select
Else
End If
ActiveSheet.Range("C4").Select
Application.ScreenUpdating = True
ActiveSheet.Protect
End Sub
Any help here would be great
Last edited: