我想在 Excel 文件中一次为每个工作表执行以下 VBA 代码:
Sub sample_code()
Columns("B:B").Select
Selection.Replace What:=" ", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Range("A:A,D:J").Select
Range("D1").Activate
Selection.Delete Shift:=xlToLeft
Columns("F:P").Select
Selection.Delete Shift:=xlToLeft
Columns("A:E").EntireColumn.AutoFit
Columns("B:B").ColumnWidth = 30.86
Range("A1:E1").Select
Selection.Font.Bold = True
End Sub
我怎样才能做到这一点?