Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Friend Sub AdjustLowHeightRow()
- Dim endRow As Integer
- endRow = FindEndRowWithGridLine()
- Dim i As Integer
- For i = 1 To endRow
- Dim currentRowHeight As Double
- currentRowHeight = Rows(i).RowHeight
- If (currentRowHeight < 16) Then
- Rows(i).RowHeight = 16
- End If
- Next i
- End Sub
- Private Function FindEndRowWithGridLine() As Integer
- Dim endRow As Integer
- endRow = 1
- Dim loopExit As Boolean
- loopExit = False
- Do
- Dim currentBorder As Border
- Set currentBorder = Cells(endRow, 1).Borders(xlEdgeLeft)
- If (currentBorder.LineStyle <> xlContinuous) Then
- loopExit = True
- End If
- endRow = endRow + 1
- Loop Until (loopExit)
- FindEndRowWithGridLine = endRow
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement