[AccessD] Excel zombie won't die

Erwin Craps Erwin.Craps at ithelps.be
Fri Aug 29 16:05:27 CDT 2003


usualy because of not closing objecsts (sometimes after an error).
you most set worksheet/book objects to nothing to...
 
 

 

Erwin Craps

Zaakvoerder 

www.ithelps.be/jonathan

 

This E-mail is confidential, may be legally privileged, and is for the
intended recipient only. Access, disclosure, copying, distribution, or
reliance on any of it by anyone else is prohibited and may be a criminal
offence. Please delete if obtained in error and E-mail confirmation to
the sender.

IT Helps - I.T. Help Center  ***  Box Office Belgium & Luxembourg

www.ithelps.be <http://www.ithelps.be/>   *  www.boxoffice.be
<http://www.boxoffice.be/>   *  www.stadleuven.be
<http://www.stadleuven.be/> 

IT Helps bvba* ** Mercatorpad 3 **  3000 Leuven

IT Helps  *  Phone: +32 16 296 404  *  Fax: +32 16 296 405 E-mail:
Info at ithelps.be 

Box Office **  Fax: +32 16 296 406 **  Box Office E-mail:
Staff at boxoffice.be <mailto:figures at boxoffice.be> 

	-----Oorspronkelijk bericht-----
	Van: Hale, Jim [mailto:jim.hale at fleetpride.com] 
	Verzonden: vrijdag 29 augustus 2003 18:39
	Aan: 'Accessd (E-mail)
	Onderwerp: [AccessD] Excel zombie won't die
	
	

	 I have an instance of Excel that I can't seem to kill except
through the task manager or shutting down Access. I can make the
instance visible and try to shut it down using exit off the file menu
but it won't shut down that way either. The code executes without error.
The code is below. What am I missing? TIA

	Jim Hale 

	Public Function Load_History(intDept As Integer, strDeptname As
String, _ 
	intCo As Integer, strRegioncode As String, strRegionName As
String, _ 
	strAreacode As String, strDept2 As String, strPlGroup As String)
As Boolean 

	dim appExcel As Excel.Application 
	Set appExcel = Excel.Application 

	........... tons of astounding code, yada,yada,yada 


	If strPW <> "none" Then 'set password 
	     For i = 1 To .Sheets.Count 
	        .Worksheets(i).Protect Password:=strPW 
	    Next i 
	        .Sheets("instruc").Unprotect Password:=strPW 
	        .Sheets("assumptions").Unprotect Password:=strPW 
	    End If 
	    .ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True 
	    .ActiveWorkbook.Protect Structure:=True, Windows:=False,
Password:=strPWworkbook 
	    .ActiveWorkbook.SaveAs FileName:=strFileSave 
	    .ActiveWorkbook.Close SaveChanges:=True 
	  End With 
	  
	 Load_History = True 
	The_End: 
	    
	    appExcel.Quit 
	    Set appExcel = Nothing 
	dbs2.Close 

	Exit Function 

	Err_CreatePlan: 
	Load_History = False 
	    MsgBox Err.Description 
	    Resume The_End 
	End Function 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030829/3c99b52e/attachment-0001.html>


More information about the AccessD mailing list