+ Reply to Thread
Results 1 to 3 of 3

Slowing Down a Macro

  1. #1
    tedd13
    Guest

    Slowing Down a Macro

    Hello,

    I am wondering if it is possible to slow the speed down on how fast a macro
    runs. For example, if you bring up the VB Editor and press the F8 key the
    macro will run as long as you hold down the key (or you can just press the
    key over and over). Doing this lets you see what is going on as the macro
    runs.
    However, if you press the play button the macro will run...very fast. It
    runs so fast that you can't see what's going on.
    So is there a way to slow down how fast it runs? In some cases I would like
    the users to be able to see what the macro is doing.

    Thanks


  2. #2
    Jim Thomlinson
    Guest

    RE: Slowing Down a Macro

    You have to insert wait times. Here is a quick (or rather slow) example...
    Run the test sub...

    Public Sub Pause(ByVal WaitTime As Integer)
    Application.Wait Now + TimeSerial(0, 0, WaitTime)
    End Sub

    Sub test()
    MsgBox 1
    Pause 2
    MsgBox 2
    Pause 4
    MsgBox 3
    End Sub

    --
    HTH...

    Jim Thomlinson


    "tedd13" wrote:

    > Hello,
    >
    > I am wondering if it is possible to slow the speed down on how fast a macro
    > runs. For example, if you bring up the VB Editor and press the F8 key the
    > macro will run as long as you hold down the key (or you can just press the
    > key over and over). Doing this lets you see what is going on as the macro
    > runs.
    > However, if you press the play button the macro will run...very fast. It
    > runs so fast that you can't see what's going on.
    > So is there a way to slow down how fast it runs? In some cases I would like
    > the users to be able to see what the macro is doing.
    >
    > Thanks
    >


  3. #3
    tedd13
    Guest

    RE: Slowing Down a Macro

    That worked!
    Thanks Jim

    "Jim Thomlinson" wrote:

    > You have to insert wait times. Here is a quick (or rather slow) example...
    > Run the test sub...
    >
    > Public Sub Pause(ByVal WaitTime As Integer)
    > Application.Wait Now + TimeSerial(0, 0, WaitTime)
    > End Sub
    >
    > Sub test()
    > MsgBox 1
    > Pause 2
    > MsgBox 2
    > Pause 4
    > MsgBox 3
    > End Sub
    >
    > --
    > HTH...
    >
    > Jim Thomlinson
    >
    >
    > "tedd13" wrote:
    >
    > > Hello,
    > >
    > > I am wondering if it is possible to slow the speed down on how fast a macro
    > > runs. For example, if you bring up the VB Editor and press the F8 key the
    > > macro will run as long as you hold down the key (or you can just press the
    > > key over and over). Doing this lets you see what is going on as the macro
    > > runs.
    > > However, if you press the play button the macro will run...very fast. It
    > > runs so fast that you can't see what's going on.
    > > So is there a way to slow down how fast it runs? In some cases I would like
    > > the users to be able to see what the macro is doing.
    > >
    > > 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