Friday, September 14, 2012

How to Adjust Rows Height and Columns Width using Excel VBA Macro

Excel VBA Macro To Adjust Rows Height and 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

Thanks,Tamatam

No comments:

Post a Comment

Hi User, Thank You for visiting My Blog. Please post your genuine Feedback or comments only related to this Blog Posts. Please do not post any Spam comments or Advertising kind of comments which will be Ignored.

Featured Post from this Blog

How to compare Current Snapshot Data with Previous Snapshot in Power BI

How to Dynamically compare two Snapshots Data in Power BI Scenario: Suppose, we have a sample Sales data, which is stored with Monthly Snaps...

Popular Posts from this Blog