View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
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?