下面的代码(一大段代码的部分行)成功运行,测试通过了
With ws.Range(record_line & ":" & record_line).Font
.Name = "Arial Unicode MS"
.Size = 12
End With
ws.Cells.EntireColumn.AutoFit
With ws.PageSetup
.PrintArea = ""
.FitToPagesWide = 1
.Orientation = xlLandscape
End With
我想优化一下,可否用一个with结构来解决?