.ldb file not being deleted

  • Thread starter Thread starter Rick
  • Start date Start date
R

Rick

i have a macro in Excel that opens an Access database and
runs an Access macro.

The Excel macro has the following code:

Dim AT As Object
Set AT = CreateObject("Access.Application")
AT.Visible = False
AT.opencurrentdatabase
("c:\<pathname>\<database>")
AT.docmd.RunMacro "accesmacro"
AT.Quit

Everything seems to run correctly, the database is opened
and the access macro does what it is supposed to do. The
only thing that doesn't happen is that the .ldb is not
deleted. Is there something I left out.

Any help will be greatly appreciated.

Thanks,

Rick
 
i have a macro in Excel that opens an Access database and
runs an Access macro.

The Excel macro has the following code:

Dim AT As Object
Set AT = CreateObject("Access.Application")
AT.Visible = False
AT.opencurrentdatabase
("c:\<pathname>\<database>")
AT.docmd.RunMacro "accesmacro"
AT.Quit

Everything seems to run correctly, the database is opened
and the access macro does what it is supposed to do. The
only thing that doesn't happen is that the .ldb is not
deleted. Is there something I left out.
it might be:

Rule of thumb:

everything you Set set it back to nothing

set AT=Nothing
If you expect an answer to a personal mail, add the word "manfred" to the first 10 lines in the message
MW
 
Back
Top