Custom Status Bar Message

  • Thread starter Thread starter Richard
  • Start date Start date
R

Richard

Good Morning,
Does anyone know how to create a custom message to appear
in the status bar when the workbook is open on the screen?
(Where 'Ready' is normally displayed), as I want to put
a 'Developed by Blah Blah' at the bottom of the file I
have.

Many Thanks

Richard
 
You could use a macro to do this job, but, as a user, I could be quite
upset about losing the normal Excel statusbar messages.

This macro (contained in the ThisWorkBook macro sheet) will display the
message for 4 seconds and then remove it :-

'-------------------------------------------------
Private Sub Workbook_Open()
Application.StatusBar = "Developed by ........"
Application.Wait Now + TimeValue("00:00:04")
Application.StatusBar = False
End Sub
'---------------------------------------------------

I suggest a simpler, more acceptable, more effective, method would be
to include your note somewhere in the worksheet that first comes to
view.
 
You should save the original state and restore on exit, e.g.

Dim oldStatusBar
Dim stateStatusBar As Boolean

Private Sub Workbook_BeforeClose(Cancel As Boolean)

Application.StatusBar = stateStatusBar
Application.DisplayStatusBar = oldStatusBar

End Sub

Private Sub Workbook_Open()

With Application
stateStatusBar = .StatusBar
oldStatusBar = .DisplayStatusBar
.DisplayStatusBar = True
.StatusBar = "Developed by ........"
End With

End Sub


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Hello Bob,

I read this message, I want to use it, but where do I put it. In this
workbook I have something.
I tried to put it there to, but I got a error message. After that I tried to
put it into a module, but that had no effect.

Could you please help me

Thanks

Bert

Bob Phillips said:
You should save the original state and restore on exit, e.g.

Dim oldStatusBar
Dim stateStatusBar As Boolean

Private Sub Workbook_BeforeClose(Cancel As Boolean)

Application.StatusBar = stateStatusBar
Application.DisplayStatusBar = oldStatusBar

End Sub

Private Sub Workbook_Open()

With Application
stateStatusBar = .StatusBar
oldStatusBar = .DisplayStatusBar
.DisplayStatusBar = True
.StatusBar = "Developed by ........"
End With

End Sub


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Bert,

It goes in the ThisWorkbook code module.To do that, select the appropriate
workbook in the VB IDE Explorer pane. Within this you will see a folder
called 'Microsoft Excel Objects', open this and you will see the
'ThisWorkbook' module. Double click that and the code pane opens up. Put the
code in there.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

Bert said:
Hello Bob,

I read this message, I want to use it, but where do I put it. In this
workbook I have something.
I tried to put it there to, but I got a error message. After that I tried to
put it into a module, but that had no effect.

Could you please help me

Thanks

Bert
 
Hello Bob,

tired to do so but I have already a code in This Workbook, and yourcode does
not work. Can I email you whta's in This workbook?

Bert
 
Bert,

Feel free.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Back
Top