I have an Excel File open and have performed some functions on it. Now I want
to get a reference to this file and close it without saving changes by
feeding the file name to a function, but this doesn't work; can someone
please correct it for me?
Function FileCloseXLSNoSave(argFileName)
Set oXL = GetObject("", "Excel.Application")
Set oWB = oXL.Workbooks.Close argFileName, False
Set oWB = Nothing
Set oXL = Nothing
End Function
Thanks much in advance.