Prevent Users From Saving

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) 
Dim lResult As VBA.VbMsgBoxResult

   If SaveAsUI = True Then
      lResult = MsgBox("You are unable to save this workbook in a different location!" & vbCrLf & _
                       "Would you like to save your changes ?", vbQuestion + vbYesNo)
      If lResult = vbYes Then
      End If
   End If
End Sub

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext