Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
check if name object exists
is there a function to see if a name object exists?
(thanks in advance) |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
check if name object exists
Try a function like
Function NameExists(WhatName As String) As Boolean Dim S As String On Error Resume Next S = ThisWorkbook.Names(WhatName).Name NameExists = (Err.Number = 0) End Function You call this with code like If NameExists(WhatName:="MyRangeName") = True Then ' whatever Else ' something End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (email address is on the web site) "mark kubicki" wrote in message ... is there a function to see if a name object exists? (thanks in advance) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
check if sheet exists | Excel Discussion (Misc queries) | |||
check if the sheet/tag exists | Excel Worksheet Functions | |||
How to check from VBA if sheet exists? | Excel Programming | |||
verifying an object exists | Excel Programming | |||
Checking to see if a Range Object exists? | Excel Programming |