General information
Category:
Coding, syntax & commands
**This seem to let me use an range name that's on sheet1 on sheet2.
** then when I look in excel the ranges names for each sheet are differntiated like this
** name sheetX
** LastDay Sheet1!
** LastDay Sheet2!
mySheetIs = alltrim(oExcel.ActiveSheet.name)
.range(myOwnRange).name = MyOwnName && give this cell this name
nam = ALLTRIM(oexcel.range(MyOwnRange).name.name) && what name to a variable
IF .not. "!"$nam
nam = mySheetIs + "!" + nam && this lets you use the same name again as far as I can see
endif
ref = oexcel.range(MyOwnRange).name.RefersToR1C1 && get the r1c1 reference
oexcel.Names.add(nam, ref) && make sure the range name is added won't make copies
Previous
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