Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excell: How to set a cell to display a variable 1

Status
Not open for further replies.

klmorgan

Technical User
Joined
Aug 31, 2001
Messages
224
Location
GB
I have a macro in a worksheet that opens and updates links on a number of sheets and saves them.

This takes quiet a time and I would like to set a variable to the name of the sheet that is currently being updated and displaying it on the open sheet to let people know it is working and not stopped.

The vaiable I can load by:
mvar = "M:\Business Management Systems\1 Operations\Waterfall\Can Line Link.xls"

But how can I either put a box on screen to display this or make a cell on the controlling sheet equal to this so that people can see it?

Regards

Keith
 
Hiya,

As I usually run macros with
Code:
Application.ScreenUpdating
set to False (this means you don't sit & watch the macro do its work - the screen 'freezes') I end up using the
Code:
Application.Statusbar
for displaying messages. It's quick & easy & will update even with ScreenUpdating set to False

All you do is add the line:
Application.Statusbar = "Please wait ... updating " & mvar
before the code starts running.
Before the
Code:
End Sub
, add
Code:
Application.Statusbar = False
to release the statusbar back to Excel - otherwise your message stays displayed until you quit Excel ;-)

HTH

Cheers
Nikki
 
Thanks for the help Nikki

Kind Regards

Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top