how do you set up a progress bar when running a macro in excel?

G

Guest

I have written a macro which takes a minute or so to run. I want to set up a
progress bar so the user can see something happening and knows the program
hasn't crashed. How do I do this?
 
G

Guest

I was about to ask almost the same question (and this was the top post)

I want to display some type of message as the macro starts... then when its
done, have the message go away. something like "Please wait, Macro running".

The progress indicator would be nice to have as well...
 
M

Mike Fogleman

Not Everyone may have the status bar visible, so you might want to try
putting some text in a cell and then removing it -
Sheet1.Range("A2").Value = "Calculating...."
Application.ScreenUpdating = False
Some code
Sheet1.Range("A2").Value = ""
Application.ScreenUpdating = True

Mike F
 
T

Tushar Mehta

A lot safer than changing a cell's content would be to show the status
bar if appropriate.

Changing a cell requires (at a minimum) the following assumptions:

The cell is in the visible portion of a window.

That portion of the window is not obscured by another window

The cell is empty

Changing that cell will not trigger any other cascading changes

Changing the workbook's status to 'dirty' is acceptable

Neither the cell's row and column is hidden.

The cell's height and width are sufficiently large to show the progress
status

The cell's format (font size, color, pattern color, etc.) allow for a
visible progress status.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 

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