Try: File/Save/Send Records As Excel
I have had several users get this same error in 2 situations. 1) if they are trying to save to an excel file with the same name that is open or in use. 2) sometimes get that message (not situation 1) but they continue on with the script and their excel file is exported just fine. Using the same script, I have not been able to duplicate the error on my mechine. You may want to check permissions if you are on a windows network. I have found no real resolution to this error in situation 2.... I'm still working on it... but try continuing on with your script and see if you get the same results we do.
Thank you Ray that solution worked. It exports perfectly usng the save/send records as option. I don't understand why this would work while the "export records" option works for everything but excel files. I wonder if it has something to do with excel rather than FM.
Kitty thanks for your suggestion. Fortunately this was a simple fix!