应用程序状态栏属性 (Excel)Application.StatusBar property (Excel)

返回或设置状态栏中的文字。Returns or sets the text in the status bar. 读/写 StringRead/write String.

语法Syntax

表达式状态栏expression.StatusBar

expression:表示 Application 对象的变量。expression A variable that represents an Application object.

注解Remarks

如果 Microsoft Excel 控制状态栏,则本属性返回 FalseThis property returns False if Microsoft Excel has control of the status bar. 若要恢复默认的状态栏文字,可将本属性设为 False,这在状态栏处于隐藏状态时也起作用。To restore the default status bar text, set the property to False; this works even if the status bar is hidden.

示例Example

本示例在打开 Large.xls 工作簿之前将状态栏文字设为“Please be patient...”,然后将状态栏恢复为默认文字。This example sets the status bar text to "Please be patient..." before it opens the workbook Large.xls, and then it restores the default text.

oldStatusBar = Application.DisplayStatusBar 
Application.DisplayStatusBar = True 
Application.StatusBar = "Please be patient..." 
Workbooks.Open filename:="LARGE.XLS" 
Application.StatusBar = False 
Application.DisplayStatusBar = oldStatusBar

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.