Hi, all, I have the following code in a *.xlsm workbook with 4 sheets. When I click the "Create Docs" button on one sheet, it calls the CreateDocs() sub below, which in turn calls the SetLocationNumber function and the SaveExportFile sub. The sub runs fine as long as the proposed file name is unique, but it gives me the "Microsoft Excel has stopped working" error if I run it twice with the same "locaNumber" and "selectedPerson" values. When it does and I click "Restart the program", it takes quite some time before restarting. Several times I had to use Task Manager to get out of the recovery process. It fails BEFORE opening the Save As dialog box. I suspect that it has something to do with the call to ActiveWorkbook.BreakLink. Can you please help me understand where I've gone wrong?
I am using Excel 2010 in Windows 7, but some of my users are still in Office 2007 and Windows XP.
Bookmarks