J
JoeSpareBedroom
Dave:
Last week, you provided the macro below. If you recall, the goal was to look
at the row heights of the first 5 rows, skip row 6, and "copy" the row
heights to rows 7-11. After running this, nothing appears to happen, but
there are no error messages. Granted, I've only briefly studied this, but is
this chunk of code supposed to just look at the first 5 rows and assign
variables, or is it supposed to continue and duplicate what it finds?
Incidentally, I did not assign this to a button. I ran it from the Tools,
Macros menu.
Option Explicit
Sub testme()
Dim iRow As Long
With Worksheets("sheet1")
For iRow = 7 To .Cells.SpecialCells(xlCellTypeLastCell).Row
.Rows(iRow).RowHeight = .Rows(((iRow - 2) Mod 5) + 1).RowHeight
Next iRow
End With
End Sub
Last week, you provided the macro below. If you recall, the goal was to look
at the row heights of the first 5 rows, skip row 6, and "copy" the row
heights to rows 7-11. After running this, nothing appears to happen, but
there are no error messages. Granted, I've only briefly studied this, but is
this chunk of code supposed to just look at the first 5 rows and assign
variables, or is it supposed to continue and duplicate what it finds?
Incidentally, I did not assign this to a button. I ran it from the Tools,
Macros menu.
Option Explicit
Sub testme()
Dim iRow As Long
With Worksheets("sheet1")
For iRow = 7 To .Cells.SpecialCells(xlCellTypeLastCell).Row
.Rows(iRow).RowHeight = .Rows(((iRow - 2) Mod 5) + 1).RowHeight
Next iRow
End With
End Sub