Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Application.DisplayStatusBar
I want to write to the status bar to assure the user that my macro is still running and the program hasn't crashed. From the Excel help files, I have the following: saveStatusBar = Application.DisplayStatusBar Application.DisplayStatusBar = True My question is about the saveStatusBar variable. I always use Option Explicit in the declarations section, so I need to define this variable, but I'm not sure what kind of variable it is. I know that for the sake of performance, I should avoid defining it as a Variant, so what should it be? -- shellshock ------------------------------------------------------------------------ shellshock's Profile: http://www.excelforum.com/member.php...o&userid=24935 View this thread: http://www.excelforum.com/showthread...hreadid=392016 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Application.DisplayStatusBar
I defined at as a Boolean and everything is working fine. : -- shellshoc ----------------------------------------------------------------------- shellshock's Profile: http://www.excelforum.com/member.php...fo&userid=2493 View this thread: http://www.excelforum.com/showthread.php?threadid=39201 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Application.DisplayStatusBar
It's boolean.
If you type ?application.displaystatusbar in the Immediate Window (in VBA) it will return True or False depending on the current state of your statusbar. "shellshock" wrote: I want to write to the status bar to assure the user that my macro is still running and the program hasn't crashed. From the Excel help files, I have the following: saveStatusBar = Application.DisplayStatusBar Application.DisplayStatusBar = True My question is about the saveStatusBar variable. I always use Option Explicit in the declarations section, so I need to define this variable, but I'm not sure what kind of variable it is. I know that for the sake of performance, I should avoid defining it as a Variant, so what should it be? -- shellshock ------------------------------------------------------------------------ shellshock's Profile: http://www.excelforum.com/member.php...o&userid=24935 View this thread: http://www.excelforum.com/showthread...hreadid=392016 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Application.DisplayStatusBar
Assuming you are just wanting to change the text on the statusbar as apposed
to hiding and showing the statusbar itself you don't have to declare any variables. You just change the text as follows: Application.StatusBar = "Working..." 'Rest of code here Application.StatusBar = False 'returns control to Excel Hope this helps Rowan "shellshock" wrote: I want to write to the status bar to assure the user that my macro is still running and the program hasn't crashed. From the Excel help files, I have the following: saveStatusBar = Application.DisplayStatusBar Application.DisplayStatusBar = True My question is about the saveStatusBar variable. I always use Option Explicit in the declarations section, so I need to define this variable, but I'm not sure what kind of variable it is. I know that for the sake of performance, I should avoid defining it as a Variant, so what should it be? -- shellshock ------------------------------------------------------------------------ shellshock's Profile: http://www.excelforum.com/member.php...o&userid=24935 View this thread: http://www.excelforum.com/showthread...hreadid=392016 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Application.DisplayStatusBar
Thanks for the clarification, JMB. Rowan, I do want to save the current display status of the status bar so that I can restore the original display status after my program ha run its course. That's why I need the variable. : -- shellshoc ----------------------------------------------------------------------- shellshock's Profile: http://www.excelforum.com/member.php...fo&userid=2493 View this thread: http://www.excelforum.com/showthread.php?threadid=39201 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro to close excel application other than application.quit | Excel Programming | |||
DisplayStatusBar when DisplayFullScreen = TRUE | Excel Programming | |||
"Application.DisplayStatusBar = True" = ERROR | Excel Programming | |||
"Application.DisplayStatusBar = True" = ERROR | Excel Programming | |||
"Application.DisplayStatusBar = True" = ERROR | Excel Programming |