Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there any way to use the code below and still maintain a minimum row
height of 27? Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) Target.EntireRow.AutoFit End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Target.Rows.AutoFit
|
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
there may be a way, but i don't know it:
Sub test() Dim r As Long With ActiveCell.EntireRow r = Application.Max(.AutoFit, 27) ..RowHeight = r End With End Sub -- Gary "Patrick C. Simonds" wrote in message ... Is there any way to use the code below and still maintain a minimum row height of 27? Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) Target.EntireRow.AutoFit End Sub |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Oops!
Try this Target.Rows.RowHeight = 27 HTH |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I actually came up with a work around.
I needed my rows to have a minimum height of 23, but when I set the row heights to that the autofix would not increase the row height to account for those rows where text wrapping took place. So I created a hidden column and put a number in each row and selected a font size which would produce a row height that I needed. It worked great. "NoodNutt" wrote in message ... Oops! Try this Target.Rows.RowHeight = 27 HTH |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This should do it:
Private Sub Worksheet_Change(ByVal Target As Range) Target.EntireRow.AutoFit If Target.RowHeight < 27 Then Target.RowHeight = 27 End Sub Regards, Per "Patrick C. Simonds" skrev i meddelelsen ... I actually came up with a work around. I needed my rows to have a minimum height of 23, but when I set the row heights to that the autofix would not increase the row height to account for those rows where text wrapping took place. So I created a hidden column and put a number in each row and selected a font size which would produce a row height that I needed. It worked great. "NoodNutt" wrote in message ... Oops! Try this Target.Rows.RowHeight = 27 HTH |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Autofit | Excel Discussion (Misc queries) | |||
Autofit (Columns.EntireColumn.AutoFit) does not work | Excel Discussion (Misc queries) | |||
How to Use AutoFit() | Excel Programming | |||
Autofit | Excel Programming | |||
autofit does not autofit | Excel Discussion (Misc queries) |