Guest_imported
New member
- Jan 1, 1970
- 0
Dear Experts,
Hello,
I am coding in VB 6. I wish my application to shutdown automatically
when Windows 2000 is shut down. Unfortunately application is not
shutting down automatically.
I investigated and found that the following code is not allowing the
application to shutdown.
This code is written in Form_Unload event, which is essentail to be
exectued before exiting the application.
Dim xlApplication as Object
'
' Get Excel application object or create it
'
Set xlApplication = GetObject("", "Excel.Application"
If Err <> 0 Then
Err.Clear
Set xlApplication = CreateObject("Excel.Application"
End If
'
' Restore Excel default file path
'
If Err = 0 Then
xlApplication.DefaultFilePath = gXLDefaultFilePath
End If
Set xlApplication = Nothing
Thanks in advance for any assistance.
Regards,
Faiz
Hello,
I am coding in VB 6. I wish my application to shutdown automatically
when Windows 2000 is shut down. Unfortunately application is not
shutting down automatically.
I investigated and found that the following code is not allowing the
application to shutdown.
This code is written in Form_Unload event, which is essentail to be
exectued before exiting the application.
Dim xlApplication as Object
'
' Get Excel application object or create it
'
Set xlApplication = GetObject("", "Excel.Application"
If Err <> 0 Then
Err.Clear
Set xlApplication = CreateObject("Excel.Application"
End If
'
' Restore Excel default file path
'
If Err = 0 Then
xlApplication.DefaultFilePath = gXLDefaultFilePath
End If
Set xlApplication = Nothing
Thanks in advance for any assistance.
Regards,
Faiz