📜  excel vba命名范围存在 - VBA代码示例

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

代码示例1
Function NamedRangeExist(ByRef pWorkBook As Workbook, pName As String) As Boolean
    Dim nName As Name
    For Each nName In pWorkBook.Names
        If nName.Name = pName Then
            NamedRangeExist = True
            Exit Function
        End If
    Next nName
End Function