ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   "Application.DisplayStatusBar = True" = ERROR (https://www.excelbanter.com/excel-programming/277145-re-application-displaystatusbar-%3D-true-%3D-error.html)

M.

"Application.DisplayStatusBar = True" = ERROR
 
Yes, i was declered:
Private Sub CommandButton1_Click()
'
Dim i As Long
Dim oldStatusBar As String
oldStatusBar = Application.DisplayStatusBar
Application.DisplayStatusBar = True 'here program execution stoped!!!
Application.StatusBar = "Please be patient..."

For i = 1 To 10000
'

Next i


Application.StatusBar = False
Application.DisplayStatusBar = oldStatusBar
End Sub
"Ronald Dodge" wrote in message
...
Did you declare your variable as a String variable? The StatusBar

property
on the Application is in String Data Type. If the Statusbar is = "FALSE"
then Excel has control of the statusbar.

--
Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000
"M." wrote in message
...
I was put command button on sheet and wrote following code:

Private Sub CommandButton1_Click()
'
Dim i As Long
Application.StatusBar = False
oldStatusBar = Application.DisplayStatusBar
Application.DisplayStatusBar = True '*** my program stoped her

For i = 1 To 10000
'
Application.StatusBar = CStr(i) & "of" & "10000"
Next i
Application.StatusBar = False
Application.DisplayStatusBar = oldStatusBar
End Sub

Where did i make mistake? I was copied code from online help about
displaying status bar msg!

Regards

Milos









M.

"Application.DisplayStatusBar = True" = ERROR
 
I'm using Excel 97!

Regards,

Milos


"M." wrote in message
...
Yes, i was declered:
Private Sub CommandButton1_Click()
'
Dim i As Long
Dim oldStatusBar As String
oldStatusBar = Application.DisplayStatusBar
Application.DisplayStatusBar = True 'here program execution

stoped!!!
Application.StatusBar = "Please be patient..."

For i = 1 To 10000
'

Next i


Application.StatusBar = False
Application.DisplayStatusBar = oldStatusBar
End Sub
"Ronald Dodge" wrote in message
...
Did you declare your variable as a String variable? The StatusBar

property
on the Application is in String Data Type. If the Statusbar is =

"FALSE"
then Excel has control of the statusbar.

--
Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000
"M." wrote in message
...
I was put command button on sheet and wrote following code:

Private Sub CommandButton1_Click()
'
Dim i As Long
Application.StatusBar = False
oldStatusBar = Application.DisplayStatusBar
Application.DisplayStatusBar = True '*** my program stoped her

For i = 1 To 10000
'
Application.StatusBar = CStr(i) & "of" & "10000"
Next i
Application.StatusBar = False
Application.DisplayStatusBar = oldStatusBar
End Sub

Where did i make mistake? I was copied code from online help about
displaying status bar msg!

Regards

Milos












All times are GMT +1. The time now is 10:06 AM.

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