Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One way:
For i = 1 to 20 Range("A" & i & ":F" & i).Select Next i another: For i = 1 to 20 Range("A" & i).Resize(1, 6).Select Next i another: For i = 1 to 20 Cells(i, 1).Resize(1, 6).Select Next i In article , "Yiu Choi Fan" wrote: Hi all, I would like to define a range with variant in VBA program. For example, inside a for-loop, when i=1, the selected range is Range("A1":"F1"); when i=2, the selected range will be Range("A2":F2") and so on. But I don't know how to define such "Range". Can anyone help me? Thanks a lot!! C.F. Yiu |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Define a range | Excel Discussion (Misc queries) | |||
How do I assign range to variant and use | Excel Discussion (Misc queries) | |||
Define a range based on another named range | Excel Worksheet Functions | |||
Best way to paste a variant array into a range? | Excel Programming | |||
Testing if Variant is Range or Double? | Excel Programming |