Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel cell reference
Message
From
06/06/2007 11:49:01
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
05/06/2007 19:58:52
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01230317
Message ID:
01230987
Views:
21
>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).
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform