I have the following code running from a button which is working fine, but it always prompts if I want to save changes to the excel file, which I do not. Is there anything I can add so it closes/quits the excel object without prompting to save?
Dim objXL As Object
Set objXL = CreateObject("Excel.Application")
objXL.workbooks.Open "c:\examples\test.xls"
objXL.range("a2").Value = Me.text1
Me.text2 = objXL.range("c4").Value
objXL.Quit
Dim objXL As Object
Set objXL = CreateObject("Excel.Application")
objXL.workbooks.Open "c:\examples\test.xls"
objXL.range("a2").Value = Me.text1
Me.text2 = objXL.range("c4").Value
objXL.Quit