hwc2ycy老师:麻烦你帮我看一下下面一段代码有什么问题,多谢 。
Sub 设置班级格式()
Dim ws As Worksheet
For Each ws In Worksheets
If ws.Name Like "*班" Then
With ws
With .Range("a1").CurrentRegion
.Borders.LineStyle = xlContinuous
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
End With
With .Range("a1")
.RowHeight = 25
.Font.Name = "黑体"
.Font.Size = 16
End With
With .Range("a2:c2")
.RowHeight = 20
.Font.Name = "黑体"
.Font.Size = 13
End With
.Columns("A:C").EntireColumn.AutoFit
With .PageSetup
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
End With
End If
Next
End Sub