VBA 激活工作表
Worksheet.Activate方法:激活工作表。
示例
激活工作表Sheet3。
Sub sub8()
Dim wb As Workbook
Dim ws As Worksheet
Set wb = Workbooks("小步教程1.xlsx")
'激活工作表
wb.Worksheets("Sheet3").Activate
End Sub
Worksheet.Activate方法:激活工作表。
示例
激活工作表Sheet3。
Sub sub8()
Dim wb As Workbook
Dim ws As Worksheet
Set wb = Workbooks("小步教程1.xlsx")
'激活工作表
wb.Worksheets("Sheet3").Activate
End Sub