• Do not allow saveAs

    • This topic has 1 reply, 1 voice, and was last updated 15 years ago.
    Author
    Topic
    #467986

    I want to control a workbook with a macro. I want to prevent people from saving to a new location. Is there a simple way to stop the “SaveAs”?

    If not, I can write code to check the path in the Workbook_BeforeSave routine.

    Thanks.

    Viewing 0 reply threads
    Author
    Replies
    • #1217176

      I figured it out. It is easy. Initially I tried setting SaveAsUI to false, to cancel the save as. I need to trap it instead.

      Thanks.

      Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)

      If SaveAsUI = True Then
      Cancel = True
      End If

      End Sub

    Viewing 0 reply threads
    Reply To: Do not allow saveAs

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: