VBA macro Userform closing causes Excel to close

New Contributor

I have been using an Excel VBA macro for years without any issues.  The macro runs through buttons on a Userform.  It functions flawlessly as before.  It is moderately complex and gathers coordinate values from a CAD program drawing, places a label at the coordinate, and then loops through all the selected points.  I can run it multiple times.


However, when I close the Userform, almost every time Excel closes and restarts.  Since the Excel file is located on a OneDrive, if I wait long enough before closing the Userform the data is saved.


I just replaced my C: drive with a larger SSD (after the issue started happening).  All the programs were reloaded and updated.  The CAD program never has an issue.  This did not resolve the issue with closing the Userform.


My theory is that an Excel or Windows update has created the issue.  Any suggestions?

0 Replies