Checking if a property contains another specific string

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to see if a defined name's RefersTo property contains a
particular string.
To be more specific, I am going through the defined names in the workbook
and checking if any of them are pointing to a particular file path or a
worksheet.

Any pointers would be appreciated.

Jay
 
for each nm in activeworkbook.names
if instr(1,nm.Refersto,"book1.xls",vbTextcompare) then
msgbox nm.name & " " & nm.Refersto
end if
Next
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top