以下代码是从EXCEL里录制的,仅供参考,请根据你的实际情况修改.
Range("A1:B1").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.MergeCells = False
End With
Selection.Merge
Range("A1:B1").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.MergeCells = False
End With
Selection.Merge
然后结合OFFICE光盘上的VBA的帮助调调就可以了
设置单元格大小,请根据实际情况修改.
Columns("A:A").ColumnWidth = 16.13
Rows("1:1").RowHeight = 42.75
Columns("A:A").ColumnWidth = 16.13
Rows("1:1").RowHeight = 42.75