ExcelBanter

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

Tom Ogilvy

"Application.DisplayStatusBar = True" = ERROR
 
Your code ran fine for me in XL2000. If you are using Excel 97, one
possibility is to Change the TakeFocusOnClick property of the CommandButton
to false.

--
Regards,
Tom Ogilvy

"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
 
Yes, yes, yes, that's right!!!
Tom, thank's for your time!

Regards,
Milos
"Tom Ogilvy" wrote in message
...
Your code ran fine for me in XL2000. If you are using Excel 97, one
possibility is to Change the TakeFocusOnClick property of the

CommandButton
to false.

--
Regards,
Tom Ogilvy

"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









Ronald Dodge

"Application.DisplayStatusBar = True" = ERROR
 
I had forgotten about that little command button focus issue as I ran into
that with one of my XL97 projects, so I selected a cell within the command
button.

--
Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000
"Tom Ogilvy" wrote in message
...
Your code ran fine for me in XL2000. If you are using Excel 97, one
possibility is to Change the TakeFocusOnClick property of the

CommandButton
to false.

--
Regards,
Tom Ogilvy

"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 06:06 AM.

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