Results 1 to 7 of 7
  1. #1
    5 Star Lounger
    Join Date
    Jul 2003
    Location
    USA
    Posts
    728
    Thanks
    7
    Thanked 2 Times in 2 Posts

    Run-time eror 5 (Word 97/SR2)

    Hi

  2. #2
    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: Run-time eror 5 (Word 97/SR2)

    As its name implies, AutoExec only runs when Word is first launched. If you close and open documents without closing Word, it should not run again. AutoExec problems can be vexing because some commands are invalid when Word does not have a document open yet. If you need to use AutoExec (you don't want the code to run each time you open a document), you could try adding a blank document before executing your code and see whether that helps.

  3. #3
    5 Star Lounger
    Join Date
    Jul 2003
    Location
    USA
    Posts
    728
    Thanks
    7
    Thanked 2 Times in 2 Posts

    Re: Run-time eror 5 (Word 97/SR2)

    Thanks much for the tip.

    I added a new line of code (perhaps in the wrong place): Documents.Add at the very beginning of the code and all it did was open a blank document with the same Run-time Error 5 message.

    And I "can't" (manually) open a blank document without the message appearing.

    I do thank you for your time and thoughts on this annoyance.

    Acer

  4. #4
    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: Run-time eror 5 (Word 97/SR2)

    Perhaps that toolbar is missing regardless of whether a document is open. Is it not in Normal.dot? If not, we might need to work around its momentary absence in another way.

  5. #5
    5 Star Lounger
    Join Date
    Jul 2003
    Location
    USA
    Posts
    728
    Thanks
    7
    Thanked 2 Times in 2 Posts

    Re: Run-time eror 5 (Word 97/SR2)

    Jefferson -

    Again my thanks.

    I'm afraid I don't understand the reference to a toolbar. (Yes, the macro is in Normal.dot) As I said, this is an annoyance, not a major problem, so please don't spend your valuable time on this.

    Acer

  6. #6
    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: Run-time eror 5 (Word 97/SR2)

    > I'm afraid I don't understand the reference to a toolbar.

    You said the error was on the first line of code. The first line of code makes a toolbar visible. If it isn't a toolbar, of course it will fail. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    <code>CommandBars("Save Reminder").Visible = True</code>

    Perhaps you meant to put the On Error line before the above line so that if the toolbar does not exist, the code starting at NoEntry runs. Just a guess.

  7. #7
    5 Star Lounger
    Join Date
    Jul 2003
    Location
    USA
    Posts
    728
    Thanks
    7
    Thanked 2 Times in 2 Posts

    Re: Run-time eror 5 (Word 97/SR2)

    Hi, again -

    My goof. Yes, there is its toolbar (tucked away so I wasn't consciously aware of it).


    Thank you.

Posting Permissions

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