Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel cell reference
Message
De
07/06/2007 17:48:30
 
 
À
07/06/2007 15:53:20
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
01230317
Message ID:
01231458
Vues:
15
>>>>>Try it.
>>>>>It comes up as "$C$3". Numbers may be easier but how do you insert them into a .range statement?
>>>>>
>>>>>.range(.activecell.address + ":D4").select
>>>>>
>>>>>works for me.
>>>>
>>>>For a range statement, I use, for example: .Range(.Cells(lnRow1, lnCol1), .Cells(lnRow2, lnCol2))
>>>>
>>>>Still easier to work with numbers, for the cases where the range can vary.
>>>>
>>>>However, specifying the range this way is somewhat cumbersome; so I have created a method, in my reporting class, that returns an Excel range, when I pass the four parameters (specifying the upper-left and lower-right corner).
>>>
>>>
>>>And .Cells is a component of what??
>>
>>Of a sheet object, just like .Cells().
>
>Then I would expect
>
>oexcel.Range(oexcel.activesheet.cells(7,3)).Select
>
>would work, but it doesn't.


A selection is expecting an address so you need:
oexcel.Range(oexcel.activesheet.cells(7,3).Address).Select()
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform