FindName

Finds a name in a workbook, returns true or false

Function FindName(sName, Optional inWorkbook = "This") As Boolean
' Searchs for a specified name in a file (Excel)
' Needs FindFile
FindName = False
If inWorkbook = "This" Then inWorkbook = ThisWorkbook.Name
If FindFile(inWorkbook) Then
For i = 1 To Workbooks(inWorkbook).Names.Count
If Workbooks(inWorkbook).Names(i).Name = sName Then
    FindName = True
    Exit For
   end if
Next i
End If
End Function

sName, Optional inWorkbook

Views 1838 Downloads 871


ANmarAmdeen
612
Attachments
Components VBA-Excel
Revisions

v1.0

Tags
Needs