I have a macro where I pass information from solidworks to excel and then excel passes data back, these are the commands I use to close excel.
Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
' Set excel app variable
Set xlApp = CreateObject("Excel.Application")
'Sets the excel file location
Set xlBook = xlApp.Workbooks.Open("FILE NAME")
'Saves and closes the excel file
Which looks like you have the same, do you have Microsoft Excel 14.0 Object Library turned on?
Thank you, you're answers helped me making this up.
Big thumbs up to you guys!
Is there a way to get this to work for closing instances of excel that are already open?
I'm assuming you've tried these commands and it doesn't work?