Can you build in a delay...

J

Jeff Harbin

I've got a spreadsheet that opens up, refreshes the data, calculates some
statistics, updates some graphs, and the prints out a report. It all
happens so fast my operators are unsure if it actually does anything (other
than waiting for the printout). Is there a way to build in delays that
wouldn't require operator interaction to show them the status of the
process.

I was thinking of a single cell that had different text in it depending on
the step (ie., updating data, formatting report, printing report, etc.) but
I want to build in a delay function so that the messages don't fly buy so
fast the operator cannot see them.

Thanks,
 
J

JON JON

Hello Jeff,

Copy the following lines of codes in between the appropriate place in your
macro. Replace the message as necessary.

Application.StatusBar = "Wait for 5 seconds" ' Show a message to status
bar
Application.Wait Now() + TimeSerial(0, 0, 5) 'Will pause the macro for 5
seconds

Don't forget to put this line at the end of your code.

Application.StatusBar = False 'return to the default status bar

Hope this help.

Jon-jon
 
D

DavidP

An obvious solution would be to display a message box by adding something like the following as the last line of the macro

MsgBox "The sheet has been updated by the macro", vbOKOnly, "Processing Completed"

Adapt it to suit your own messages

DavidP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top