Gates Is Antichrist
Well-known Member
- Joined
- Aug 15, 2002
- Messages
- 1,961
For i = 1 To Selection.Rows.Count
ActiveCell.Offset(i - 1, 0).RowHeight=foo(i)
That's bad code. It's supposed to set the selection's row heights from array foo, and it's fine ... UNLESS ... ActiveCell is not the first row in the selection.
So I'd like one of two solutions, if you don't mind helping me:
A. set Activecell to first cell in selection, preserving selection
(then code is okay as is. Is this something like activecell.row=selection.row?)
OR
B. change the code.
(Unfortunately
Selection.Offset(i - 1, 0).RowHeight=foo(i)
sets Selection.Rows.Count rows en masse! It should only do 1 at a time)
Hep me! Hep me!
ActiveCell.Offset(i - 1, 0).RowHeight=foo(i)
That's bad code. It's supposed to set the selection's row heights from array foo, and it's fine ... UNLESS ... ActiveCell is not the first row in the selection.
So I'd like one of two solutions, if you don't mind helping me:
A. set Activecell to first cell in selection, preserving selection
(then code is okay as is. Is this something like activecell.row=selection.row?)
OR
B. change the code.
(Unfortunately
Selection.Offset(i - 1, 0).RowHeight=foo(i)
sets Selection.Rows.Count rows en masse! It should only do 1 at a time)
Hep me! Hep me!