Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How do I check for a range name within Excel using C#

I am looking for a way to search an Excel Workbook for the existance of a
particular range name that may or may not exist. Does get_Range return a
trappable error message?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default How do I check for a range name within Excel using C#

Hi
a VBA solution

dim oName as name
on error resume next
set oname=activeworkbook.names("your_range_name")
if oname is nothing then
msgbox "Name does not exist"
else
'do something
end if

--
Regards
Frank Kabel
Frankfurt, Germany

"Chuck53" schrieb im Newsbeitrag
...
I am looking for a way to search an Excel Workbook for the existance

of a
particular range name that may or may not exist. Does get_Range

return a
trappable error message?


Reply
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 do I get Excel to display a range of cells with a check box? bobm Excel Discussion (Misc queries) 2 October 21st 05 07:37 PM
How do I check for duplications in a range of data (excel)? -Adrianna_ Excel Worksheet Functions 2 November 24th 04 10:25 AM
Check if a range is a sebset of another range Bob Phillips[_6_] Excel Programming 0 May 6th 04 04:12 PM
Check if a range is a sebset of another range Chip Pearson Excel Programming 0 May 6th 04 03:54 PM
check range for certain value Gareth[_3_] Excel Programming 4 November 10th 03 03:08 PM


All times are GMT +1. The time now is 12:12 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"