I need some help on this, I have looked around and found some posts, but I can't get it to work.
I am opening an Excel file with windows scheduler on our server. Once the file is open, it automatically updates and I have written a VBA macro to save and close it. My problem is that Excel itself does not close, just the workbook closes. How do I get Excel to fully close?
Here is my vba... Thanks!!VB Code:
Public Sub CloseAll() Dim Wb As Workbook SaveAll For Each Wb In Workbooks If Wb.Name <> ThisWorkbook.Name Then Wb.Close savechanges:=True Set Wb = Nothing End If Next Wb ThisWorkbook.Close savechanges:=True Set Wb = Nothing End Sub




Reply With Quote