LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default how do i test for the existence of a range name

Hi rrobelen,

You can simply trap the error that may occur if it doesn't exist:

Public Function gbDoesNameExist(rwb As Workbook, _
rsName As String) As Boolean
On Error Resume Next
gbDoesNameExist = Len(rwb.Names(rsName).Name)
On Error GoTo 0
End Function

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


rrobelen wrote:
I know this must be trivial but I can't find it. How do i test to
see that a range name exists?

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I test for nulls within a range without specifying each ce Houston Excel Discussion (Misc queries) 2 March 25th 10 05:50 PM
Test within a range? JC Excel Worksheet Functions 3 May 25th 07 03:41 AM
Formula to test for existence of external file Al at Novelis Excel Worksheet Functions 2 August 29th 06 01:13 AM
Test if Cell is within Range (name) goepf[_6_] Excel Programming 2 December 3rd 03 03:26 PM
Testing for existence of range David Excel Programming 4 November 19th 03 07:39 AM


All times are GMT +1. The time now is 04:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"