An implementation of Visual Basic that is built into Microsoft products.
Hi @Jacques Abel ,
Thanks for testing that.
This does narrow it down well. Since wbTarget.Save followed by wbTarget.Close SaveChanges:=False works, and the same code also works on the local PC, the VBA update logic is not the part failing.
At this point, the likely problem is what happens when Excel closes or shuts down while the workbook is on the network location. In other words, this now looks more like an Excel close/shutdown plus remote file-handling issue than a workbook-update VBA issue.
For production, I recommend keeping the sequence that worked:
wbTarget.Save
DoEvents
wbTarget.Close SaveChanges:=False
Set wbTarget = Nothing
If possible, avoid Application.Quit in the same automated run.
I cannot open a development escalation directly from this Q&A thread, but your latest test results do provide the right evidence for the correct support teams to investigate it.
The two teams that make the most sense here are:
- Microsoft 365 / Excel support, because the failure appears during Excel close or shutdown.
- The IT team that manages the network file location, because the issue only appears on the hosted file and not on the local PC.
If you have a Microsoft 365 business subscription, please ask your Microsoft 365 admin to open a support request here:
https://learn.microsoft.com/en-us/microsoft-365/admin/get-help-support
If you do not have admin access, use:
https://support.microsoft.com/contactus
Please include these points in the case:
-
wbTarget.Save+wbTarget.Close SaveChanges:=Falseworks. - The same code works on a local PC.
- The failure appears when Excel is closed or when
Application.Quitis used against the network-hosted file. - The issue started after a recent Excel update.
Hope this helps! If my explanation and the information I provided were helpful to you so far, I would greatly appreciate it if you could follow the instructions here so others with the same problem can benefit as well.