+ Reply to Thread
Results 1 to 2 of 2

How: open a workbook with auto macro disabled using code?

  1. #1
    mike_cutting-edge
    Guest

    How: open a workbook with auto macro disabled using code?

    I am trying to open a number of workbooks from VBA in excel and I need to
    open them with macros disabled or auto macro disabled. This is because the
    worksheets I need to open have an auto macro which loads data from a server
    and I do not want it to run.
    Thanks.

  2. #2
    Tom Ogilvy
    Guest

    Re: open a workbook with auto macro disabled using code?

    Application.EnableEvents = False
    workbooks.Open "C:\MyFolder\Myfile.xls"
    Application.EnableEvents = True

    disables the startup macros.

    --
    Regards,
    Tom Ogilvy

    "mike_cutting-edge" <[email protected]> wrote in
    message news:[email protected]...
    > I am trying to open a number of workbooks from VBA in excel and I need to
    > open them with macros disabled or auto macro disabled. This is because the
    > worksheets I need to open have an auto macro which loads data from a

    server
    > and I do not want it to run.
    > Thanks.




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1