Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel ranges
Message
From
04/04/2006 08:40:34
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
04/04/2006 08:14:19
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Miscellaneous
Thread ID:
01110215
Message ID:
01110222
Views:
16
>Hi
>
>I want to select a range of cells like
>
>oexcel.ActiveSheet.Range("A19:Q25").Select
>
>but I want to use cell number like r1c1 etc .
>
>Whats the syntax for that as I can't seem to get it right.
>
>Thanks
>
>Nick Mason

You usually don't need to select the range of cells, you can work directly on a range of cells without selecting it.

If loSheet contains a reference to an active sheet:
loSheet.Range(loSheet.Cells(1, 1), loSheet.Cells(5, 10)).Font.Bold = .T.

* or, using the WITH command:

with loSheet
  .Range(.Cells(1, 1), .Cells(5, 10)).Font.Bold = .T.
endwith
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