LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.vb.general.discussion,microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default Excel automation: Why my code is hijacked?

Hello,
I have this routine to disconnect from Excel:

Public Sub XLDisconnectFromExcel()
If Not moExcelWS Is Nothing Then Set moExcelWS = Nothing
If Not moExcelApp Is Nothing Then Set moExcelApp = Nothing
End Sub

When the second line of that code is executed and moExcelApp is "Microsoft
Excel" then that line of code is executed properly (Excel.exe is process
terminated in Task Manager) but the code execution never returns after that
line. It just dissapears and subsequently not any other code is executed.
What can be wrong?

To connect to Excel I use this code:
Set moExcelApp = GetObject(, "Excel.Application")
If moExcelApp Is Nothing Then
Set moExcelApp = CreateObject("Excel.Application")
End If

Jack


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
automation code deepika :excel help[_2_] Excel Discussion (Misc queries) 0 February 18th 08 01:48 PM
keyboard shortcut hijacked? jonigr Excel Programming 2 March 19th 06 02:27 AM
Workshoot Menu Bar Hijacked!! Michael Rekas[_3_] Excel Programming 5 July 3rd 05 06:32 AM
Code Librarian automation? R Avery Excel Programming 8 March 21st 05 11:23 PM
Automation Code Problem from Access to Excel Tony Excel Programming 2 April 26th 04 12:58 AM


All times are GMT +1. The time now is 08:44 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"