Hi,

I'm not VBA/Marco savvy, however, I can piece together some logic within the VBA/Macros that were created.

I have a spreadsheet with a Macro and VBA module within the Macro. There is a Macro Workbook which is a Excel standard macro which is run each time the spreadsheet is opened. The Macro just contains one line which calls an update macro and VBA functions which allows the delaying of the macro for a period of time (i.e. 10 seconds) for the spread sheet to have enough time to be populated with data received from an external system. Once the delay function is run, the update macro mentioned previously is called, which basically saves the populated spreadsheet to 2 separate files. The first saves the workbook as a csv file with a name equal to a parameter specified and places it into an archive folder. The second, save as uses another parameter which then places the file into a different folder to be converted into xml format. (Another application is used to perform the xml conversion).

Everything was working fine, however, all of a sudden one day, I've received the error "Run-time error '13' type mismatch". The process still continues if I click "end" as "end" and "help" are the only options available. "Continue" and "Debug" are grayed out.

Can you please help me understand why the spread sheet will not close automatically anymore? Everything else seems to work, it's just the spread sheet is not closing after the files are saved.

Thanks.