Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
FIX: Annoying inconsistent errors in Excel via Access automation | Excel Discussion (Misc queries) | |||
HELP!!! Please - Weird and inconsistent errors and crashes. | Excel Discussion (Misc queries) | |||
HELP!!! Please - Weird and inconsistent errors and crashes. | Excel Discussion (Misc queries) | |||
Handling errors in formulas (how annoying are they!) | Excel Discussion (Misc queries) | |||
annoying bell when trapping errors | Excel Programming |