Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel, check to see if a range name exists?
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Excel, check to see if a range name exists?
Miscellaneous
Thread ID:
00926603
Message ID:
00926603
Views:
102
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
Map
View

Click here to load this message in the networking platform