View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Nikos Yannacopoulos[_5_] Nikos Yannacopoulos[_5_] is offline
external usenet poster
 
Posts: 80
Default Microsoft Excel VB opening Access Application

Why don't you just add a Quit action at the end of your Autoexec macro in
the Access .mdb?

HTH,
Nikos

"JD Smooth" wrote in message
...
Using the following code I'm able to open Access Databases, and with the

proper autoexec macro within the database it will run the required tasks.
Access however even once it has performed it's tasks and should terminate,
it stays running behind the scenes sucking resources. Is there a command
that should be added to close access? It never really opens, it simply is
running behind the scenes so there isn't a way to close it.

Sub start_access1()
' Initialize string to database path.
Const strConPathToSamples = "C:\Documents and

Settings\rcheek\Desktop\"
strDB = strConPathToSamples & "autoruntest.mdb"
' Create new instance of Microsoft Access
Set AppAccess = _
CreateObject("Access.Application")
' Open database in Microsoft Access window.
AppAccess.OpenCurrentDatabase strDB
End Sub