Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel, check to see if a range name exists?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00926603
Message ID:
00926615
Views:
15
Have to add the range in order for it to appear in the range names

*accept " type a name to " to orange
clear

o = GETOBJECT(,'excel.application')
orange = "asdf"
o.Names.Add(orange, "=sheet1!R1C1:R3C3") &&& add the range --------->>
ThisNewName = orange
orange = o.Range("a1")
WAIT WINDOW orange.value

FOR i = 1 TO o.Names.Count
thisHere = thisNewName
thisOne = ALLTRIM(LOWER(o.Names[i].name ))

IF thisHere$thisOne
? o.Names[i].name
endif
ENDFOR

WAIT WINDOW orange.value
Previous
Reply
Map
View

Click here to load this message in the networking platform