Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro to close excel application other than application.quit mary Excel Programming 1 September 14th 04 03:43 PM
DisplayStatusBar when DisplayFullScreen = TRUE mikeang Excel Programming 0 December 31st 03 05:05 PM
"Application.DisplayStatusBar = True" = ERROR Tom Ogilvy Excel Programming 2 September 16th 03 05:09 PM
"Application.DisplayStatusBar = True" = ERROR Tom Ogilvy Excel Programming 0 September 16th 03 02:10 PM
"Application.DisplayStatusBar = True" = ERROR M. Excel Programming 1 September 16th 03 01:53 PM


All times are GMT +1. The time now is 06:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"