1174
Chapter 43 Building Custom Applications with VBA
Displaying Messages in Excel with VBA
You can create a similar macro for Excel, but there’s no corresponding Document_New() event
to hook into. In Excel, you access the Subject text through this snippet of code:
ActiveWorkbook.BuiltinDocumentProperties(“Subject”)
MsgBox()
and InputBox() comprise the two major ways of displaying messages for users.
There’s a third, often overlooked, way: You can also display a message in the status bar, at
the bottom of the Word or Excel window. In Word, use the following code:
Statusbar = “Text to appear in the status bar”
For no apparent reason, Excel uses a slightly ...