I have a client running a macro using excel 2003 over a terminal server. I am running into a problem where I can't save an excel sheet as a csv because it says that the file is being used by another user. I only have this problem over the term server. I have other people running the macro from their desktops without incident. I then need to go into task manager and end the excel.exe process and re-run---which then it works. Does anyone have any idea why I would have this problem over the term server and is there a way I can test to see if excel is open--and if it is close it prior to my activeworkbook.saveas line. Below are the lines where I am saving the xls file as a csv. I get the error on the activeworkbook.saveas
Workbooks(ImportMasterName & ".xls").Activate
ActiveWorkbook.SaveAs Filename:=ImportPath & ImportMasterName & ".csv", FileFormat:=xlCSV, CreateBackup:=False
Workbooks(ImportMasterName & ".csv").Close
like i said it works fine but only over the term server do i have the problem. Thanks for any help.
bill mahoney
Workbooks(ImportMasterName & ".xls").Activate
ActiveWorkbook.SaveAs Filename:=ImportPath & ImportMasterName & ".csv", FileFormat:=xlCSV, CreateBackup:=False
Workbooks(ImportMasterName & ".csv").Close
like i said it works fine but only over the term server do i have the problem. Thanks for any help.
bill mahoney