LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Closing Excel From VB

Hi guys
I am having problem in closing the excel application from my COM Component
I have following code in one of my COM method and when the method finishes, I still see Excel application running in task ba

can anyone help me? please can you tell me what i am doing wrong? Thanks in advanc

Dim appXl As Excel.Applicatio
Dim oWorkBook As Excel.Workboo
Dim qTable As Excel.QueryTabl

Set appXl = CreateObject("Excel.Application"
appXl.Workbooks.Open "someifle.xls

'' import the text fil
Set qTable = appXl.ActiveSheet.QueryTables.Add(Connection:=
"TEXT;" & strCSVFileName, Destination:=Range("A1")

For Each oWorkBook In appXl.Workbook
oWorkBook.Close SaveChanges:=Tru
oWorkBook.Application.Qui
Nex

Set qTable = Nothin
appXl.Qui
Set oWorkBook = Nothin
Set appXl = Nothing
 
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
Closing workbooks w/o closing Excel Barb in MD Excel Discussion (Misc queries) 3 February 15th 10 06:42 PM
Closing Excel Marvin Kornblau New Users to Excel 1 January 7th 07 12:57 AM
Closing Excel Diane Excel Discussion (Misc queries) 2 March 24th 05 07:27 PM
closing Excel in VBA Jeff[_29_] Excel Programming 1 April 7th 04 08:56 AM
closing excel after closing a workbook CWalsh[_2_] Excel Programming 3 January 21st 04 03:33 PM


All times are GMT +1. The time now is 02:20 AM.

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

About Us

"It's about Microsoft Excel"