#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Row Height

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Row Height

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default Row Height

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Set a minimum row height a the same time with autofit row height Julie B New Users to Excel 2 May 5th 23 07:44 PM
Row Height stopped growing and Auot-Fit Row Height does not work PSULionRP Excel Discussion (Misc queries) 0 May 19th 09 07:59 PM
Resizing row height to dynamically fit height of text box Jon Excel Discussion (Misc queries) 1 August 8th 05 01:37 PM
resize row height and column height Tom Setting up and Configuration of Excel 3 April 3rd 05 02:03 PM
Set new row height based on current height puffy Excel Programming 2 January 14th 04 12:44 AM


All times are GMT +1. The time now is 10:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"