Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / September 2007

Tip: Looking for answers? Try searching our database.

Checking if a property contains another specific string

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
hugehead - 13 Sep 2007 16:26 GMT
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
Tom Ogilvy - 13 Sep 2007 17:52 GMT
for each nm in activeworkbook.names
 if instr(1,nm.Refersto,"book1.xls",vbTextcompare) then
      msgbox nm.name & " " & nm.Refersto
 end if
Next

Signature

regards,
Tom Ogilvy

> I am trying to see if a defined name's RefersTo property contains a
> particular string.
[quoted text clipped - 5 lines]
>
> Jay
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.