• Disable macros on file open (Excel2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Disable macros on file open (Excel2000)

    Author
    Topic
    #389002

    I want to open a file from the File-Open dialog under VBA but I don’t want the macros in the selected file to run.
    I seem to recall something like an ‘enableFileOpenMacros’ setting but my brain is in Friday mode.
    Or do I turn ‘enableEvents’ off temporarily or something?

    Any help much appreciated.

    zeddy

    Viewing 0 reply threads
    Author
    Replies
    • #685453

      Hold the shift key while clicking the Enable macros Button and while the file opens.

      • #685454

        I can click the disable macros button.
        But I want to do it in VBA.

        zeddy

        • #685459

          Try Disabling the events before opening

          Steve

              Application.EnableEvents = False
              Workbooks.Open "c:Filename.xls"
              Application.EnableEvents = True 
          • #685787

            Steve
            Thanks for your reply – exactly right.

            zeddy

    Viewing 0 reply threads
    Reply To: Reply #685453 in Disable macros on file open (Excel2000)

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

    Your information:




    Cancel