PASCAL,
After doing some more searching I got this code to work. I am
reformatting a list that needs these row heights in various rows. So I
select the row and run the macro and it adjusts the next five rows to
these dimensions.
Code:
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 9/8/2011 by Steve A. Turner
'
'
Rows(Selection.Row).RowHeight = 21.75
ActiveCell.Offset(1, 0).Select
Rows(Selection.Row).RowHeight = 36.75
ActiveCell.Offset(1, 0).Select
Rows(Selection.Row).RowHeight = 20.25
ActiveCell.Offset(1, 0).Select
Rows(Selection.Row).RowHeight = 15.75
ActiveCell.Offset(1, 0).Select
Rows(Selection.Row).RowHeight = 18.75
End Sub
End code:
Steve A. Turner
Controller
Mid-South Engineering Co. Inc
E-Mail: sturner@mseco.com and saturner@mseco.com
________________________________
From: ExcelVBA@yahoogroups.com [mailto:ExcelVBA@yahoogroups.com] On
Behalf Of Pascal
Sent: Thursday, September 08, 2011 3:21 PM
To: ExcelVBA@yahoogroups.com
Subject: [ExcelVBA] Re: set different row heights
It'll just be a tweak of the recorded macro, can you post the code?
--- In ExcelVBA@yahoogroups.com <mailto:ExcelVBA%40yahoogroups.com> ,
"saturner1946" <sturner@...> wrote:
>
> I want to set different row heights for 5 rows from the current
selected row. The macro recorder picks the actual row numbers and I
can't remember how to select the row and change it's height and go down
to the next row and change its height to something different and so on
till I set the 5 rows. Then I want to select another row and start it
again to set the next 5 rows.
>
[Non-text portions of this message have been removed]
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
Tidak ada komentar:
Posting Komentar