Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default FIX: Annoying inconsistent errors in Excel via Access automation


hi

Edit: Can you please amend your post to include Code tags (the hash
symbol above where you type your message) around your code?
End Edit

I can't tell from your partial code extract if you are already doing
what I'm about to suggest, but this may help remove the "phantom"
instances of Excel...

At the end of each macro, the memory should be released by setting your
object variables to nothing ie:
(assuming the same syntax in Access VBA as in Excel)


Code:
--------------------

Dim oXL As Object ' Excel.Application
Dim oWbk1 As Object ' Excel.Workbook
Dim oSht As Object 'Excel.Worksheet

'your code...

'free memory
set oSht = nothing
oWbk1.Save
oWbk1.Close
Set oWbk1 = nothing
'this should prevent the phantom appearances
oXL.quit
set oXL = nothing

--------------------


hth
Rob


--
broro183

Rob Brockett. Always learning & the best way to learn is to
experience...
------------------------------------------------------------------------
broro183's Profile: http://www.thecodecage.com/forumz/member.php?userid=333
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=13406

Reply
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
FIX: Annoying inconsistent errors in Excel via Access automation [email protected] Excel Discussion (Misc queries) 0 September 23rd 08 01:36 PM
HELP!!! Please - Weird and inconsistent errors and crashes. Trefor Excel Discussion (Misc queries) 12 October 30th 07 10:14 AM
HELP!!! Please - Weird and inconsistent errors and crashes. Tim Zych Excel Discussion (Misc queries) 0 October 26th 07 04:38 PM
Handling errors in formulas (how annoying are they!) anon90210 Excel Discussion (Misc queries) 1 January 17th 05 01:26 PM
annoying bell when trapping errors Mika Excel Programming 0 November 7th 03 10:41 AM


All times are GMT +1. The time now is 07:30 PM.

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"