View Single Post
  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default

I don't think you can ensure anything. But you could autofit and add just a bit
to each rowheight?

I adjusted all the used rows in the active worksheet with this:

Option Explicit
Sub testme01()

Dim wks As Worksheet
Dim myRow As Range

Set wks = ActiveSheet
With wks
.UsedRange.Rows.AutoFit
For Each myRow In .UsedRange.Rows
myRow.RowHeight = myRow.RowHeight + 2
Next myRow
End With

End Sub

You can play around with that "fudge factor" to see if a smaller number would be
sufficient (or larger???).

====
And sometimes when you have lots of text in cells, the last few rows just seem
to drop off the world. If you add alt-enters every 80-100 characters, you can
see more in the cell.

The bad news is that autofit may not work (depending on how much text is
there). You'd have to resize that row manually (or add a line to the macro--if
you know the line number!):

With wks
.UsedRange.Rows.AutoFit
For Each myRow In .UsedRange.Rows
myRow.RowHeight = myRow.RowHeight + 2
Next myRow
.rows(33).rowheight = 66
End With

GraySmithy wrote:

Does anyone know if you can adjust Format Rows Autofit to ensure WYSIWYG when
printing. I am continually frustrated that when I print after using the
autofit function that I get text cut in half and underlines missing. Autofit
does not seem to work properly. Can it be set to slightly overcompensate
perhaps?


--

Dave Peterson