Mega Code Archive

 
Categories / VisualBasic Script / Excel
 

Checking for the Existence of a Name

Function NameExists(FindName As String) As Boolean     Dim Rng As Range     Dim myName As String     On Error Resume Next     myName = ActiveWorkbook.Names(FindName).Name     If Err.Number = 0 Then         NameExists = True     Else         NameExists = False     End If End Function