How can I enumerate the macro list in Access97?

V

VBAAAggghh!!

In VBA in an open DB, I am creating a new blank DB, and copying over every
object from my open DB. Everything can be copied except for the Macros. I
can't find a collection of them or any way to enumerate them.

Any ideas out there? I just need to loop thru the list of existing macros
so I can use CopyObject on each of them.
 
A

Allen Browne

Believe it or not, they're called Scripts, e.g.:
Dim doc As DAO.Document
For Each doc in dbEngine(0)(0).Containers!Scripts.Documents
etc
 
C

chris.nebinger

I usually just rely on the MSYSObjects table for this:

Select Name from MSYSOBJECTS where Type = -32766

Although it doesn't give as much information as the DAO.Document
object, it works for determining which ones exist.


Chris Nebinger
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top