I had posted a problem with an automation error. Its been bugging me so I decided to play some more. This is an error when I m trying to save an excel file. If I do the following:
Code:'turn on the hourglass 'cause this could take some time... Screen.MousePointer = vbHourglass objXL.DisplayAlerts = False 'don't show any alerts objXL.Visible = False 'hide the sheet objXL.Application.ScreenUpdating = True 'allow updates If (WorkSheetExists(Me.txtTPos.Text, objXL)) Then 'do nothing 'sheet exists already so we just need to add the components Else 'create the sheet Call CreateWorkSheet(Me.txtTPos.Text, objXL) objXLWrkBk.Save End If Call InsertComponents(Me.txtTPos.Text, objXL) 'now insert the components 'objXLWrkBk.Close SaveChanges:=True 'save the changes objXL.Quit 'quit excel
It quits the excel application but ASKS me if I want to save...I dont want it to ask me this. So I used the .DisplayAlerts and set it to false with no luck. Also I tried the one with the ' in front of it the:
This used to work in my previous access application but it keeps giving me an automation error. So I had to comment it out. Basically I want to save this excel file and quit. But its not working!!!!Code:'objXLWrkBk.Close SaveChanges:=True 'save the
Please help if possible.
Jon




Reply With Quote