YellowLabPro
03-04-2007, 01:40 PM
Sub AlignGrid()
'
' To center sizing matrix
' Macro recorded 3/4/2007 by Doug Stroud
'
'
Dim rng As Range
Dim i As Long
Set rng = Application.InputBox("Select range with the mouse", Type:=8)
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlCenter
.Name = "Arial"
.Font.Size = 10
.Font.Bold = False
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.ColumnWidth = 3
.RowHeight = 12.75
End With
End Sub
Some of the cell properties are failing to change from the above code, specifically, ColumnWidth, RowHeight, Size, Font.Bold, Name, Horizontal.
Is my code setup incorrectly?
Thanks,
YLP
'
' To center sizing matrix
' Macro recorded 3/4/2007 by Doug Stroud
'
'
Dim rng As Range
Dim i As Long
Set rng = Application.InputBox("Select range with the mouse", Type:=8)
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlCenter
.Name = "Arial"
.Font.Size = 10
.Font.Bold = False
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.ColumnWidth = 3
.RowHeight = 12.75
End With
End Sub
Some of the cell properties are failing to change from the above code, specifically, ColumnWidth, RowHeight, Size, Font.Bold, Name, Horizontal.
Is my code setup incorrectly?
Thanks,
YLP