Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Access Modules daovba ado > Problem quittin...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 1447 of 1609
Post > Topic >>

Problem quitting Excel in Acess VBA code

by =?Utf-8?B?Sm9objEzNA==?= <John134@[EMAIL PROTECTED] > Mar 26, 2008 at 12:14 PM

I have the same problem that Mike has on a previous post. My code quits
Excel 
on the screen but leaves Excel running in the Task Manager. My project is
to 
transfer an Access Table to Excel and convert it to a Pivot Table. To do
this 
each time 
I have to delete the Excel file and exit Excel.  All my code is working 
except for this issue with quitting Excel.

Here is part of my code referring to this issue: 

Dim MySheetPath As String 
MySheetPath = "E:\LA Snr Ctr\Activity Log.xls" 
Dim XL As Object 
Dim XLBook As Object 
Dim XLSheet As Object 
Set XL = CreateObject("Excel.Application") 
DoCmd.TransferSpreadsheet acEx****t, acSpreadsheetTypeExcel97, "Activity 
Log", "E:\LA Snr Ctr\Activity Log.xls", True 
Set XLBook = GetObject(MySheetPath) 
XL.Visible = True 
XLBook.Windows(1).Visible = True 
Set XLSheet = XLBook.Worksheets(1) 

(other code)

Fin: XLBook.Close False 
XL.Quit 
Kill "E:\LA Snr Ctr\Activity Log.xls" 
Set XLSheet = Nothing 
Set XLBook = Nothing 
Set XL = Nothing 

Any suggestions on where the error is would be greatly appreciated 

John134
 




 3 Posts in Topic:
Problem quitting Excel in Acess VBA code
=?Utf-8?B?Sm9objEzNA==?=   2008-03-26 12:14:01 
Re: Problem quitting Excel in Acess VBA code
"Jeanette Cunningham  2008-03-27 06:58:45 
Re: Problem quitting Excel in Acess VBA code
Stefan Hoffmann <stefa  2008-03-27 10:12:20 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Nov 21 10:53:07 CST 2008.