PC Review


Reply
Thread Tools Rate Thread

Checking if a property contains another specific string

 
 
=?Utf-8?B?aHVnZWhlYWQ=?=
Guest
Posts: n/a
 
      13th Sep 2007
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
 
Reply With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      13th Sep 2007
for each nm in activeworkbook.names
if instr(1,nm.Refersto,"book1.xls",vbTextcompare) then
msgbox nm.name & " " & nm.Refersto
end if
Next

--
regards,
Tom Ogilvy


"hugehead" wrote:

> 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

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Checking specific text string in excel files stored in a folder AG Microsoft Excel Programming 4 18th Mar 2010 12:39 AM
Get Property value of class instance by passing string property name mrussell@bluebayinvest.com Microsoft Excel Programming 2 19th Oct 2007 05:47 PM
Setting property value to string or accessing property methods Brian Mitchell Microsoft VB .NET 2 26th May 2005 01:27 PM
Conflicting used space information when checking the drive property against marking all files and checking the marked file properties. elloko Windows XP Configuration 3 19th Dec 2004 05:34 AM
Cannot create an object of type 'System.String[]' from its string representation 'String[] Array' for the 'Options' property. Hessam Microsoft C# .NET 0 8th Aug 2003 09:45 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:50 AM.