General information
Category:
Coding, syntax & commands
Title:
Excel, check to see if a range name exists?
I am trying to find out if a range name exists before creating one in excel. I can get
a list of all range names with step 2. However, if I first create a new range name oRange,
as in step 1, the process in step 2 will not find this name. and after I run step 2, the new
range name oRange is gone. how can I check to see if a range name has already been used.
Thanks
Steve
** step 1
oEx = GETOBJECT(,'excel.application')
oRange = "asdf"
ThisNewName = orange
oRange = oEx.Range("a1")
WAIT WINDOW oRange.value && shows .7036
*** step 2
FOR i = 1 TO o.Names.Count
thisOne = ALLTRIM(LOWER(oEx.Names[i].name ))
IF thisNewName$thisOne
? oEx.Names[i].name
endif
ENDFOR
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only