Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Someone please help me with this code. I'm trying to write a macro t
autosize an undetermined amount of rows and set a minimum row height o 33.75. Any ideas? I keep stepping through my code and it wil autosize, but then changes all the rows to 33.75, instead of leavin the ones alone that have to be larger. Thanks. Sub Rows() Selection.Rows.AutoFit If RowHeight < 33.75 Then Selection.RowHeight = 33.75 End If End Su -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub Rows()
Selection.Rows.AutoFit for each rw in selection.Rows If rw.RowHeight < 33.75 Then rw.RowHeight = 33.75 End If Next End Sub -- Regards, Tom Ogilvy "hyyfte " wrote in message ... Someone please help me with this code. I'm trying to write a macro to autosize an undetermined amount of rows and set a minimum row height of 33.75. Any ideas? I keep stepping through my code and it will autosize, but then changes all the rows to 33.75, instead of leaving the ones alone that have to be larger. Thanks. Sub Rows() Selection.Rows.AutoFit If RowHeight < 33.75 Then Selection.RowHeight = 33.75 End If End Sub --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Option Explicit Sub TEST() If TypeName(Selection) = "Range" Then Selection.Rows.AutoFit Dim CL As Range For Each CL In Selection.Rows If CL.RowHeight < 33.75 Then CL.RowHeight = 33.75 Next End If End Sub -- Regards, Soo Cheon Jheong _ _ ^ ^ ~ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Set a minimum row height a the same time with autofit row height | New Users to Excel | |||
Row Height stopped growing and Auot-Fit Row Height does not work | Excel Discussion (Misc queries) | |||
Resizing row height to dynamically fit height of text box | Excel Discussion (Misc queries) | |||
resize row height and column height | Setting up and Configuration of Excel | |||
Set new row height based on current height | Excel Programming |