camillaEne
New Member
- Joined
- Oct 30, 2023
- Messages
- 8
- Office Version
- 365
- Platform
- Windows
Hi,
I have a VBA code that loops through different files, making changes in them and then saving the files. When saving some of the larger files, I have a problem that the Saving dialog box will not close.
I save the following way:
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Application.DisplayStatusBar = False
Application.EnableEvents = False
DoEvents
wb.SaveAs filepath, ConflictResolution:=xlLocalSessionChanges
DoEvents
wb.Close SaveChanges:=False
The file is saved locally on my computer, but this saving dialog box do not close (see picture). I need to press cancel in order for the code to proceed with the next file. Can I force it to close in my code? Or how to deal with this problem?
Thank you very much for helping!!
I have a VBA code that loops through different files, making changes in them and then saving the files. When saving some of the larger files, I have a problem that the Saving dialog box will not close.
I save the following way:
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Application.DisplayStatusBar = False
Application.EnableEvents = False
DoEvents
wb.SaveAs filepath, ConflictResolution:=xlLocalSessionChanges
DoEvents
wb.Close SaveChanges:=False
The file is saved locally on my computer, but this saving dialog box do not close (see picture). I need to press cancel in order for the code to proceed with the next file. Can I force it to close in my code? Or how to deal with this problem?
Thank you very much for helping!!