Heenan, Lambert
Lambert.Heenan at AIG.com
Wed Oct 5 15:09:08 CDT 2005
What's the code for setting the Excel instance, and the code you are using to close it? Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Hale, Jim Sent: Wednesday, October 05, 2005 3:56 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Setting objects to nothing I have a function that can use up to 14 recordsets but may use as few as three depending upon which case is selected.So I typically go For x = 1 To y If Not (rs(x) Is Nothing) Then rs(x).Close: Set rs(x) = Nothing Next x where y is the number of recordsets I actually opened. The problem is I have an Excel instance that refuses to die and the only thing I can figure is some dimensioned objects I never use still exist. Jim Hale