'/========================================/
' Sub Purpose: make all rows iHeight or greater
'/========================================/
'
Public Sub ChangeHeight()
Dim dbl As Double
Dim dblLastRow As Double
Dim iHeight As Integer
Dim strSelection As String
On Error GoTo err_Sub
'variable height
iHeight = 105
'save original selection
strSelection = Selection.Address
'autofit all rows
Cells.EntireRow.AutoFit
'get last row in worksheet
dblLastRow = ActiveSheet.Cells.SpecialCells(xlLastCell).Row
'loop through all rows, if height < desired, make desired height
For dbl = 1 To dblLastRow
If Range("A1").Offset(dbl - 1, 0).RowHeight < iHeight Then
Range("A1").Offset(dbl - 1, 0).RowHeight = iHeight
End If
Next dbl
exit_Sub:
On Error Resume Next
Exit Sub
err_Sub:
Debug.Print "Error: " & Err.Number & " - (" & _
Err.Description & _
") - Sub: " & _
"ChangeHeight - " & Now()
GoTo exit_Sub
End Sub
'/========================================/