Thread: Named Cell test
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Named Cell test

you could try:

Sub test()
Dim rngTemp As Range

On Error Resume Next
Set rngTemp = Range("NameTest")
On Error GoTo 0

If rngTemp Is Nothing Then
MsgBox "Does not exist"
Else: MsgBox rngTemp.Address(, , , True)
End If


End Sub


"Brettjg" wrote:

How do I find out if a named cell exists or not from VB (if it doesn't exist
I will the redefine which I know how to do). Regards, Brett