I did download Jan Karel Pieterse, but that does not help me. I have 85 workbooks in this model. I need to know if the name is referenced from another workbook in the model.
The direction I headed was to do a find. Following is a piece of that code. It works for some cases. If I am headed the right direction, I will continue to determine what patterns I need to look for. The case I found using Jan Karel's tool, which I had not considered, is a formula that uses the intersection of two names.
Code: Select all
'after setting the "lookfor" variable = the pattern I need to find, do the following.
On Error Resume Next
Set cFoundIn = sht2.Cells.Find(What:=lookfor, After:=sht2.Cells(1, 1), LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False)
if Err.Number = 91 Then
bFound = False
Else
bFound = True
end if
I am making progress on this mess!