Friday, 14 September 2012

Excel VBA Macro To Adjust Rows Height and Columns Width

Excel VBA Macro To Adjust Rows Height & Columns Width

Method 1:

Sub AlignCorrect()

ActiveSheet.Rows.RowHeight = 15
ActiveSheet.Columns.ColumnWidth = 15

End Sub


Method 2:

Sub HeightWidth()
Dim x As Integer
Dim y As Integer


For x = 2 To 500
For y = 1 To 26

Cells(x, y).Rows.RowHeight = 15
Cells(x, y).Columns.ColumnWidth = 15
Next y
Next x


End Sub

1 comment:

Follow Me by Email

ExcelKingdom-Popular Posts

ExcelKingdom-Random Posts