ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Get the string of the statusbar (https://www.excelbanter.com/excel-programming/298521-get-string-statusbar.html)

RB Smissaert

Get the string of the statusbar
 
Using Excel XP and 2003.
Is there any way to get the message of the statusbar into a string variable?
It doesn't seem you can as the documentation says that if Excel has control
over the statusbar the return value is False and that is indeed so.
The reason why I am interested to get this string is that I have to make a
new
statusbar message out of the existing one plus another string.
Would any API method help here?

RBS


Norman Jones

Get the string of the statusbar
 
Hi RBS,

Sub DemoStatusbar()
Dim aStr As String
Debug.Print Application.StatusBar
Application.StatusBar = "My Message"
Debug.Print Application.StatusBar
aStr = Application.StatusBar & " to the world"
Application.StatusBar = aStr
Debug.Print Application.StatusBar
applicationstatusbar = ""
Debug.Print Application.StatusBar
End Sub

---
Regards,
Norman

"RB Smissaert" wrote in message
...
Using Excel XP and 2003.
Is there any way to get the message of the statusbar into a string

variable?
It doesn't seem you can as the documentation says that if Excel has

control
over the statusbar the return value is False and that is indeed so.
The reason why I am interested to get this string is that I have to make a
new
statusbar message out of the existing one plus another string.
Would any API method help here?

RBS




Norman Jones

Get the string of the statusbar
 
Typo: applicationstatusbar = ""
should be: Application.Statusbar = ""

"Norman Jones" wrote in message
...
Hi RBS,

Sub DemoStatusbar()
Dim aStr As String
Debug.Print Application.StatusBar
Application.StatusBar = "My Message"
Debug.Print Application.StatusBar
aStr = Application.StatusBar & " to the world"
Application.StatusBar = aStr
Debug.Print Application.StatusBar
applicationstatusbar = ""
Debug.Print Application.StatusBar
End Sub

---
Regards,
Norman

"RB Smissaert" wrote in message
...
Using Excel XP and 2003.
Is there any way to get the message of the statusbar into a string

variable?
It doesn't seem you can as the documentation says that if Excel has

control
over the statusbar the return value is False and that is indeed so.
The reason why I am interested to get this string is that I have to make

a
new
statusbar message out of the existing one plus another string.
Would any API method help here?

RBS






RB Smissaert

Get the string of the statusbar
 
Yes, that works.
In my case though I need to retain the sheet filter message (19 of 26
records found) that is
displayed in the statusbar and with that it doesn't work.
I have managed to get the window handle of the statusbar, but I have come no
further yet.

RBS


"Norman Jones" wrote in message
...
Typo: applicationstatusbar = ""
should be: Application.Statusbar = ""

"Norman Jones" wrote in message
...
Hi RBS,

Sub DemoStatusbar()
Dim aStr As String
Debug.Print Application.StatusBar
Application.StatusBar = "My Message"
Debug.Print Application.StatusBar
aStr = Application.StatusBar & " to the world"
Application.StatusBar = aStr
Debug.Print Application.StatusBar
applicationstatusbar = ""
Debug.Print Application.StatusBar
End Sub

---
Regards,
Norman

"RB Smissaert" wrote in message
...
Using Excel XP and 2003.
Is there any way to get the message of the statusbar into a string

variable?
It doesn't seem you can as the documentation says that if Excel has

control
over the statusbar the return value is False and that is indeed so.
The reason why I am interested to get this string is that I have to

make
a
new
statusbar message out of the existing one plus another string.
Would any API method help here?

RBS







Tom Ogilvy

Get the string of the statusbar
 
Why not just determine this information from the filter and build your own
message.

--
Regards,
Tom Ogilvy

"RB Smissaert" wrote in message
...
Yes, that works.
In my case though I need to retain the sheet filter message (19 of 26
records found) that is
displayed in the statusbar and with that it doesn't work.
I have managed to get the window handle of the statusbar, but I have come

no
further yet.

RBS


"Norman Jones" wrote in message
...
Typo: applicationstatusbar = ""
should be: Application.Statusbar = ""

"Norman Jones" wrote in message
...
Hi RBS,

Sub DemoStatusbar()
Dim aStr As String
Debug.Print Application.StatusBar
Application.StatusBar = "My Message"
Debug.Print Application.StatusBar
aStr = Application.StatusBar & " to the world"
Application.StatusBar = aStr
Debug.Print Application.StatusBar
applicationstatusbar = ""
Debug.Print Application.StatusBar
End Sub

---
Regards,
Norman

"RB Smissaert" wrote in message
...
Using Excel XP and 2003.
Is there any way to get the message of the statusbar into a string
variable?
It doesn't seem you can as the documentation says that if Excel has
control
over the statusbar the return value is False and that is indeed so.
The reason why I am interested to get this string is that I have to

make
a
new
statusbar message out of the existing one plus another string.
Would any API method help here?

RBS









RB Smissaert

Get the string of the statusbar
 
I could do that, but there is not always a filter message in the statusbar,
so I
would have to make code for a number of different situations, complicating
matters.
Still it might be the easiest option indeed.

RBS

"Tom Ogilvy" wrote in message
...
Why not just determine this information from the filter and build your own
message.

--
Regards,
Tom Ogilvy

"RB Smissaert" wrote in message
...
Yes, that works.
In my case though I need to retain the sheet filter message (19 of 26
records found) that is
displayed in the statusbar and with that it doesn't work.
I have managed to get the window handle of the statusbar, but I have

come
no
further yet.

RBS


"Norman Jones" wrote in message
...
Typo: applicationstatusbar = ""
should be: Application.Statusbar = ""

"Norman Jones" wrote in message
...
Hi RBS,

Sub DemoStatusbar()
Dim aStr As String
Debug.Print Application.StatusBar
Application.StatusBar = "My Message"
Debug.Print Application.StatusBar
aStr = Application.StatusBar & " to the world"
Application.StatusBar = aStr
Debug.Print Application.StatusBar
applicationstatusbar = ""
Debug.Print Application.StatusBar
End Sub

---
Regards,
Norman

"RB Smissaert" wrote in message
...
Using Excel XP and 2003.
Is there any way to get the message of the statusbar into a string
variable?
It doesn't seem you can as the documentation says that if Excel

has
control
over the statusbar the return value is False and that is indeed

so.
The reason why I am interested to get this string is that I have

to
make
a
new
statusbar message out of the existing one plus another string.
Would any API method help here?

RBS










Tom Ogilvy

Get the string of the statusbar
 
No there isn't (always a filter message) - so that is why it seems better to
do your own count. I am not sure how you would consider applying a filter
and then not performing your action because there is no filter message. The
cases where it doesn't show has more to do with the content of the range
being filtered (as opposed to the results) than anything to do with the
operation of the filter, so not sure why that is an appropriate condition
for action or inaction.

--
Regards,
Tom Ogilvy

"RB Smissaert" wrote in message
...
I could do that, but there is not always a filter message in the

statusbar,
so I
would have to make code for a number of different situations, complicating
matters.
Still it might be the easiest option indeed.

RBS

"Tom Ogilvy" wrote in message
...
Why not just determine this information from the filter and build your

own
message.

--
Regards,
Tom Ogilvy

"RB Smissaert" wrote in message
...
Yes, that works.
In my case though I need to retain the sheet filter message (19 of 26
records found) that is
displayed in the statusbar and with that it doesn't work.
I have managed to get the window handle of the statusbar, but I have

come
no
further yet.

RBS


"Norman Jones" wrote in message
...
Typo: applicationstatusbar = ""
should be: Application.Statusbar = ""

"Norman Jones" wrote in message
...
Hi RBS,

Sub DemoStatusbar()
Dim aStr As String
Debug.Print Application.StatusBar
Application.StatusBar = "My Message"
Debug.Print Application.StatusBar
aStr = Application.StatusBar & " to the world"
Application.StatusBar = aStr
Debug.Print Application.StatusBar
applicationstatusbar = ""
Debug.Print Application.StatusBar
End Sub

---
Regards,
Norman

"RB Smissaert" wrote in message
...
Using Excel XP and 2003.
Is there any way to get the message of the statusbar into a

string
variable?
It doesn't seem you can as the documentation says that if Excel

has
control
over the statusbar the return value is False and that is indeed

so.
The reason why I am interested to get this string is that I have

to
make
a
new
statusbar message out of the existing one plus another string.
Would any API method help here?

RBS













All times are GMT +1. The time now is 11:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com