[AccessD] TrasnferSpreadsheet failing

Mike Mattys mmattys at rochester.rr.com
Wed Mar 18 09:23:20 CDT 2009


Interesting ... I just had this related ghost problem due to passing an 
array
as a parameter byref into a sub for modification.

I think that because I opened a recordset in the sub that VBA created it's
own link to Access and wouldn't close even though I explicitly called for
both db.close and acc.quit and set variables to nothing.

I should've known?

-
Michael R Mattys
MapPoint and Database Dev
www.mattysconsulting.com
-

----- Original Message ----- 
From: "Stuart McLachlan" <stuart at lexacorp.com.pg>
To: "Access Developers discussion and problem solving" 
<accessd at databaseadvisors.com>
Sent: Wednesday, March 18, 2009 9:15 AM
Subject: Re: [AccessD] TrasnferSpreadsheet failing


> Are you manipulating the spreadsheet in VBA?  An orphaned Excel instance 
> is usually
> caused by not fully qualifying a reference somewhere.
>
> See http://support.microsoft.com/default.aspx?kbid=178510
>
> <quote> When you write code to use an Excel object, method, or property, 
> you should
> always precede the call with the appropriate object variable. If you do 
> not, Visual Basic
> establishes its own reference to Excel.
> </quote>
>
> The example given is:
> xlSheet.Range(Cells(1,1),Cells(10,2)).Value = "Hello"
> needs to be
> xlSheet.Range(xlSheet.Cells(1,1),xlSheet.Cells(10,2)).Value = "Hello"
>
> I got bitten by this one a couple of years ago and it took me a long time 
> to track down.
>
> -- 
> Stuart
>
> On 17 Mar 2009 at 15:29, Jennifer Gross wrote:
>
>> I often times cannot get the ghost of Excel to end, so it requires a
>> reboot.  One quirky thing I have found with exporting to Excel from
>> Access is that if I do it over and over again and close the Excel mother
>> ship each time then I will get an error and this ghost I cannot get rid
>> of.  If I only close the spreadsheets themselves, leaving Excel open,
>> then I all works fine.  Don't know what that's about, and probably not
>> related to your issue.
>>
>> Jennifer
>>
>
>
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com 




More information about the AccessD mailing list