Results 1 to 5 of 5
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Error with macro (2000)

    A colleague has written a macro that reformats a document. Specifically, it resets the margins and font size--not much else. He has several hundred documents to reformat in this manner, and of course the macro is a huge time-saver. The macro runs just fine on most of his documents, but when he tries to run it on long documents (sorry, I don't know how long) it coughs up an error message: "Run-time error 4608

  2. #2
    Star Lounger
    Join Date
    Mar 2002
    Location
    North Carolina, USA
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Error with macro (2000)

    Macros that you record often contain lots of commands that you don't really need. This is probably the case here. Tell him to try disabling this particular line by putting an apostrophe at the beginning of it (making it a comment).

  3. #3
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Error with macro (2000)

    Lucas,

    Another thing for your colleague to check - if they have declared any variables as Integers, they should change them to Long. Integers are limited to 32K and change, and there are situations where you can exceed that limit - for example, if you were counting the number of lines in a really long document.

    Gary

  4. #4
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Re: Error with macro (2000)

    Thanks! I've passed on your suggestion to my colleague, and I'll let you know what develops.

  5. #5
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Re: Error with macro (2000)

    Thanks, Gary. I've forwarded your message to my colleague, and I'll let you know what happens. Your tip makes sense!

Posting Permissions

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