I'm using an excel application object in VB to create an excel document to show to the user.
The trouble is that when the user quits the excel application I have created, the excel process continues to run in the background. It seems to shut down only when my main VB application is closed.
I would like that when the user quits excel, the process stop immediately.
Maybe someone can help me...
Here's a part of my code showing the "closing procedure"
The trouble is that when the user quits the excel application I have created, the excel process continues to run in the background. It seems to shut down only when my main VB application is closed.
I would like that when the user quits excel, the process stop immediately.
Maybe someone can help me...
Here's a part of my code showing the "closing procedure"
Code:
Set objExcel = New Excel.Application
Set objBook = objExcel.Workbooks.Add
'*****************
'some code to fill the excel document.....
'*******************
'Restoring the normal display mode
objExcel.DisplayAlerts = True
objExcel.Interactive = True
'Showing the book to the user
objExcel.Visible = True
'Quitting procedure
Set objSheet = Nothing
Set objBook = Nothing
objExcel.UserControl = True
Set objExcel = Nothing
Unload Me
Exit sub