📜  excel vba 如何获取范围的完整地址,包括工作表名称 - VBA 代码示例

📅  最后修改于: 2022-03-11 14:51:54.497000             🧑  作者: Mango

代码示例1
'VBA function to retrieve the full address of a range:

Function FullAddress(r As Range)
    With r
        FullAddress = "'" & .Parent.Name & "'!" & .Address
    End With
End Function

'--------------------------------------------------------------------

MsgBox FullAddress        'Displays: 'My Sheet'!$A$1:$Z$99