Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel, checking to see if a range name exists
Message
 
À
03/08/2004 15:37:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00930432
Message ID:
00930536
Vues:
15
**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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform