Good day all
Trying to remind the user to save a template as something else. This must be basic VBA but I can't put my finger on the problem.
I get run time error 91 object variable not set with this.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim MyWkbk As Workbook
If MyWkbk.Name = Book3.xls Then
MsgBox prompt:="Don't step on the template"
End If
End Sub
Trying to remind the user to save a template as something else. This must be basic VBA but I can't put my finger on the problem.
I get run time error 91 object variable not set with this.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim MyWkbk As Workbook
If MyWkbk.Name = Book3.xls Then
MsgBox prompt:="Don't step on the template"
End If
End Sub