|
Sheets(1).Select
Sheets(1).Columns("A:A").ColumnWidth = 5
Sheets(1).Columns("B:B").ColumnWidth = 57
Sheets(1).Columns("C:C").ColumnWidth = 12
Sheets(1).Columns("D:D").ColumnWidth = 7.75
Sheets(1).Columns("E:E").ColumnWidth = 50
Sheets(1).Rows("1:1").RowHeight = 30
Sheets(1).Rows("2:2").RowHeight = 19.5
Sheets(1).Rows("3:3").RowHeight = 30.75
Sheets(1).Rows("4:4").RowHeight = 84.75
Sheets(1).Rows("5:5").RowHeight = 66.75
Sheets(1).Rows("6:6").RowHeight = 27
Sheets(1).Rows("7:7").RowHeight = 42
Sheets(1).Rows("8:8").RowHeight = 24
Sheets(1).Rows("9:9").RowHeight = 30
===================================
Sheets(1).Range("A1:E1").Select
Selection.Merge
ActiveCell.FormulaR1C1 = "周工作总结"
With Selection.Font
.Name = "宋体"
.Size = 16
End With
Selection.Font.Bold = True
Sheets(1).Range("A1:E1").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.MergeCells = True
End With
Sheets(1).Range("A2").Select
Selection.Merge
ActiveCell.FormulaR1C1 = "序号"
With Selection.Font
.Name = "宋体"
.Size = 10
End With
Selection.Font.Bold = True
Sheets(1).Range("A2").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.MergeCells = True
End With
===========================
请问大神有没有办法可以简化上面两段代码,一段是设置行、列的高宽度,一段是设置合并单元格,然后在每个单元格中输入不同的文字,比如周总结、序号、1月、2月、3月
|
|