T
terry b
[Excel 2002]
I'm a raw beginner w/ VBA, as evidenced by the simple problem I'm
stumped by...
All I'm trying to do is, starting w/ a clean worksheet, write a sub to
apply the value "55" to ranges beginning w/ "A13", then skipping rows
4 thru 6, then entering value in range "A79", etc., and setting a
stop point around row 36.
So basically, I'm trying to write a simple loop to apply formatting to
alternating bands/ranges, and am using the value "55" as a placeholder.
Here's what I'm trying to make work:
Sub PracticeBanding()
Dim MyRange As Object
Set MyRange = Range("A13").Select
Do Until ActiveCell.Row > 36 = True
MyRange.Value = 55
MyRange.Offset(6, 0).Select
Loop
End Sub
So what happens is, As I step through the procedure, it selects the
first range, applies the correct value, offsets down to the next range
just fine...and then fails to apply the values, and just loops back up
to original range and back down to empty range over and over....it
doesn't apply the values after the first range....
I know this is basic as gravity, but I'd sure appreciate someone
helping me with it! Thanks much for your time [
terry b.
I'm a raw beginner w/ VBA, as evidenced by the simple problem I'm
stumped by...
All I'm trying to do is, starting w/ a clean worksheet, write a sub to
apply the value "55" to ranges beginning w/ "A13", then skipping rows
4 thru 6, then entering value in range "A79", etc., and setting a
stop point around row 36.
So basically, I'm trying to write a simple loop to apply formatting to
alternating bands/ranges, and am using the value "55" as a placeholder.
Here's what I'm trying to make work:
Sub PracticeBanding()
Dim MyRange As Object
Set MyRange = Range("A13").Select
Do Until ActiveCell.Row > 36 = True
MyRange.Value = 55
MyRange.Offset(6, 0).Select
Loop
End Sub
So what happens is, As I step through the procedure, it selects the
first range, applies the correct value, offsets down to the next range
just fine...and then fails to apply the values, and just loops back up
to original range and back down to empty range over and over....it
doesn't apply the values after the first range....
I know this is basic as gravity, but I'd sure appreciate someone
helping me with it! Thanks much for your time [
terry b.