Application.ReferenceStyle 属性 (Excel)

返回或设置 Microsoft Excel 是以 A1 引用样式还是以 R1C1 引用样式显示单元格引用和行、列标题。 可读/写 XlReferenceStyle

语法

表达式ReferenceStyle

expression:表示 Application 对象的变量。

备注

XlReferenceStyle 可以是以下常量之一:

  • xlA1
  • xlR1C1

示例

本示例显示当前引用样式。

If Application.ReferenceStyle = xlR1C1 Then 
 MsgBox ("Microsoft Excel is using R1C1 references") 
Else 
 MsgBox ("Microsoft Excel is using A1 references") 
End If

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。