Hi
I have sveral workbooks open and i just want to save and close a particular one. From google searches i see this is straightforward if you use the same script to first open the file but i just want to save and close without opening and leave all other workbooks running. I wonder if the code below just needs the Set objWorkbook reference set to a named running workbook? Not sure how to do that and everything i tried just gives an error. Thanks for any help.
set objExcel = SetObject("Excel.Application")
objExcel.Visible = True
objExcel.DisplayAlerts = FALSE
Set objWorkbook = objExcel.Workbooks.Open ("c:\test\database.xlsx")
objWorkbook.SaveAs("c:\test\database.xlsx")
objExcel.Quit
Bookmarks