G
Guest
I have a situation where I have more than 1 instance of Excel open. The most
recent instance is opened by code in my database. When the code line (see
below) that closes Excel is executed all instances close. I only want the
one that Access opened to close.
Any help would be appreciated.
DoCmd.RunMacro "mac
elWalTB"
Set xlWkb = GetObject("g:\Accounting\AR\AR Database\Macros.xls")
Set xlApp = xlWkb.Parent
xlApp.Visible = True
xlWkb.Windows(1).Visible = True
xlWkb.Application.Run ("Import_TB")
xlWkb.Close savechanges:=False
Set xlWkb = Nothing
xlApp.Quit
Set xlApp = Nothing
recent instance is opened by code in my database. When the code line (see
below) that closes Excel is executed all instances close. I only want the
one that Access opened to close.
Any help would be appreciated.
DoCmd.RunMacro "mac

Set xlWkb = GetObject("g:\Accounting\AR\AR Database\Macros.xls")
Set xlApp = xlWkb.Parent
xlApp.Visible = True
xlWkb.Windows(1).Visible = True
xlWkb.Application.Run ("Import_TB")
xlWkb.Close savechanges:=False
Set xlWkb = Nothing
xlApp.Quit
Set xlApp = Nothing