用vbs控制关闭excel

2024-12-25 21:13:09
推荐回答(1个)
回答1:

Sub aa()
Dim MyXL As Object
Set MyXL = GetObject(, "Excel.Application")
For Each axls In MyXL.Workbooks
axls.Close

Next

Set MyXL = Nothing
Workbooks.Open ("目标excel")
End Sub