Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Ephrata, Washington, USA
    Posts
    683
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Macro Error (2003)

    One of our programmers wrote this email to me. Do you have any suggestions?


    I have a Word doc that contains a macro. Upon opening the doc, the macro seems to fire but the expected result does not present itself and Word closes. In order to step through the macro I must get Word to stay open. In order to do that I have to disable the macro. When I am in the doc with macro disabled and try step into the macro I get an error message that says the macro is disabled. the only way I see in the help instructions to enable the macro is by going out of word and back in again in Enabled mode. In which case, of course, the doc flashes at me and goes away, still leaving me with no way to troubleshoot the errant macro.

    Even in Visual Basic, if the doc is opened with macro disabled, I don't see a way to enable it from within the document or project. Anybody have any suggestions?

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro Error (2003)

    Open the doc with macros disabled. Go into the VB Editor and find the macro in question. Insert a Stop statement as the first executable statement in the macro. Close the file and save the change. Open the file with macros enabled and it should stop when the macro is executed and wait for you to step through it.
    Legare Coleman

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Macro Error (2003)

    In Word 2, 6, 95, 97, 2000, and 2002: holding the shift key down while opening a document will prevent an AutoOpen macro from running. I don't know about 2003, or whether it also works against Document_Open event procedures. But it's worth a try. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

Posting Permissions

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