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