By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,478 Members | 1,526 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,478 IT Pros & Developers. It's quick & easy.

Reading Microsoft Access Macros via VBA code

P: n/a
Hello,
is there any way of reading Microsoft Access Macros via VBA code? Or
better still through VB .net code?

By reading I mean being able to read what the actions are plus any
parameters & comments.

I dont want to execute any of the steps just read them.

Dont want to convert them to VBA functions either, I would like to read
them direct.

Hope someone can help...

Thanks
Paul M
Mar 1 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi Paul

I don't think VBA allows you to do this directly, but there is an indirect
method.

You can loop through CurrentProject.AllMacros to get the name of each macro,
and export the contents to a text file with:
SaveAsText acMacro, "Macro1", "C:\Macro1.txt"

That allows you to Open and read through the text file. It's messy, but
feasible, and certainly works if you are trying to find if a particular
action is present.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Paul M" <pa**@nospam.co.uk> wrote in message
news:du**********@newsg4.svr.pol.co.uk...
Hello,
is there any way of reading Microsoft Access Macros via VBA code? Or
better still through VB .net code?

By reading I mean being able to read what the actions are plus any
parameters & comments.

I dont want to execute any of the steps just read them.

Dont want to convert them to VBA functions either, I would like to read
them direct.

Hope someone can help...

Thanks
Paul M

Mar 1 '06 #2

P: n/a
There's also a way to convert macros to code. I don't know that this
would be a profitable path to follow, but you might look into how to do
that programmatically, and then do your searching right in the module
created.

Jeremy
--
Jeremy Wallace
Fund for the City of New York
http://metrix.fcny.org

Mar 1 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.