Breaking

Sunday 20 May 2018

Excel VBA - Close all workbooks at once


Copy & Paste the following code in Excel VBA.
Sub CloseAllWorkbooks()
Dim wbs As Workbook
For Each wbs In Workbooks
wbs.Close SaveChanges:=True
Next wb
End Sub

Sub CloseAllWorkbooks()
Dim wbs As Workbook
For Each wbs In Workbooks
wbs.Close SaveChanges:=True
Next wb
End Sub


No comments:

Post a Comment