# Microsoft Office Application Help - Excel Help forum > For Other Platforms(Mac, Google Docs, Mobile OS etc) >  >  Reflections WRQ VBA Macro Timer, Pause, or Wait command

## tpollard1

I have recorded a .rbs script file in Reflections, the only thing it does is press the page up button about 40 times. The problem is when I run the macro the pages go by so fast I can't see the information i'm looking for on the page. I don't know if the right thing i'm looking for is a timer, pause, or wait command. 

I would like the macro to pause for about 3 seconds on each page which will give me adequate time to visually scan the page for what i'm looking for. 

As a nice to have it would be great if the macro would stop if I pressed any key on the keyboard. Thanks

----------


## gmr4evr1

Have you tried this...



```
Please Login or Register  to view this content.
```


or...



```
Please Login or Register  to view this content.
```


These will both give a 3 second pause

----------


## tpollard1

Thanks for the quick response. I tried the code and it gave me a message of invalid time argument.
Below is a snapshot of the code i'm using with what you gave me inserted. 

Sub Pageup()
' Generated by the Reflection Macro Recorder on 05-29-2015 11:14:27.30.
' Generated by WRQ Reflection for ReGIS Graphics 11.0.
    On Error GoTo ErrorHandler

    Const NEVER_TIME_OUT = 0

    Dim ESC As String   ' Chr$(rcESC) = Chr$(27) = Control-[

    ESC = Chr$(rcESC)

    With Session
        .StatusBar = "Waiting for Prompt: FUNCTION KEY>"
        .WaitForString "", NEVER_TIME_OUT, rcAllowKeystrokes
        .StatusBar = ""
        ' Press VtPrevScreen (Perform the Previous Screen function).
        .TransmitTerminalKey rcVtPrevScreenKey



        Application.Wait Now() + 3 / 86400



        .StatusBar = "Waiting for Prompt: FUNCTION KEY>"
        .WaitForString ESC & "", NEVER_TIME_OUT, rcAllowKeystrokes
        .StatusBar = ""
        ' Press VtPrevScreen (Perform the Previous Screen function).
        .TransmitTerminalKey rcVtPrevScreenKey




        Application.Wait Now() + 3 / 86400



        .StatusBar = "Waiting for Prompt: FUNCTION KEY>"
        .WaitForString ESC & "", NEVER_TIME_OUT, rcAllowKeystrokes
        .StatusBar = ""
        ' Press VtPrevScreen (Perform the Previous Screen function).
        .TransmitTerminalKey rcVtPrevScreenKey

    Exit Sub

ErrorHandler:
    .MsgBox Err.Description, vbExclamation + vbOKOnly

    End With
    ' Recording stopped at 11:15:02.66.
End Sub

----------


## gmr4evr1

Maybe remove the () after Now? If not, did you try the 2nd code I provided?

----------


## tpollard1

Thank you for your help. I continued to research and figured it out. I simply had to insert Session.Wait "3", this causes the program to wait 3 seconds before it simulates pressing the page up button again. Thanks for looking into this for me. 

Session.Wait "3"
        .TransmitTerminalKey rcVtPrevScreenKey

Session.Wait "3"
        .TransmitTerminalKey rcVtPrevScreenKey

Session.Wait "3"
        .TransmitTerminalKey rcVtPrevScreenKey

Session.Wait "3"
        .TransmitTerminalKey rcVtPrevScreenKey

----------


## gmr4evr1

Sorry about that, when I first posted the suggestions, I didn't realize that you were using "With Session". Actually I didn't realize it even after you posted your code until now...oops.  :Roll Eyes (Sarcastic):  
I'm glad you were able to get it worked out though.

----------

