[AccessD] Excel Automation Question

Rocky Smolin rockysmolin at bchacc.com
Thu Aug 25 14:55:34 CDT 2016


Dear List:

 

I want to open a spreadsheet from Access and am using:

 

    Set objXLApp = New Excel.Application

    objXLApp.Workbooks.Open gstrBackEndPath & "\PO_" &
Me.cboPOList.Column(1) & ".xlsx"

    objXLApp.Visible = True

 

which works just fine.  However, when the spreadsheet is closed by the user
the instance of Excel remains - I can see it in the Task Manager.

 

If I close the spreadsheet from Access:

 

    objXLApp.ActiveWorkbook.Save

    objXLApp.ActiveWorkbook.Close True

    objXLApp.Quit

    Set objXLApp = Nothing

 

Of course, Excel goes away.

 

Is there a technique for closing that instance of access when the user
closes a spreadsheet opened by an access program?

 

MTIA

 

 

Rocky Smolin

Beach Access Software

760-683-5777

 <http://www.bchacc.com> www.bchacc.com

 <http://www.e-z-mrp.com> www.e-z-mrp.com

Skype: rocky.smolin

 

 



More information about the AccessD mailing list