Results 1 to 3 of 3
  1. #1
    JustCallMeAl
    Guest

    Simulating a Macro Pause in VBA

    Knowledgebase article Q148484 addresses simulating a macro pause in VBA.

    As I was looking at it, the question popped in my mind, "Why would I want to do that?"

    The reason for that question is because, as far as I know/understand, no events can occur during that pause. In other words, in VBA there is not a DoEvents type of critter.

    So, what are some reasons one may want to pause?

  2. #2
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: Simulating a Macro Pause in VBA

    Because sometimes the macro gets ahead of the computer. This happens mostly in AutoExec macros in global templates. Something that you expect to be loaded into memory isn't there yet at startup.
    Charles Kyle Kenyon
    Madison, Wisconsin

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Simulating a Macro Pause in VBA

    Actually DoEvents is perfectly valid in VBA of all flavors. If I remember correctly, it is a method of the Application object. The problem is that it is also dangerous in a multiuser application because it can allow the app to step all over itself.
    Charlotte

Posting Permissions

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