473,394 Members | 1,416 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Reading Microsoft Access Macros via VBA code

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
2 3227
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: fabrice | last post by:
Hello, I've got trouble reading a text file (event viewer dump) by using the getline() function... After 200 - 300 lines that are read correctly, it suddenly stops reading the rest of the...
163
by: Shiperton Henethe | last post by:
Hi Know any good utilities to help me strip out the tags that Microsoft Excel 2002 leaved behind when you try and export an HTML format file? This is driving me NUTS. And really makes me...
4
by: Matt Howard | last post by:
I was wondering if anyone had any code samples on how to call functions within a Microsoft Access module using ASP.NET. I found a posting on how to do it with C#, but does anyone know how to do it...
2
by: Daniel | last post by:
I use an Access database to basically take data exports, import them, manipulate the data, and then turn them into exportable reports. I do this using numerous macros, and queries to get the data...
6
by: Reg | last post by:
At present I'm running a number of macros with a schedular on my computer to update and maintain databases within our network. All my backends contain the tables that the macros update. But all the...
20
by: Olav.NET | last post by:
I am a .NET/C++ developer who is supposed to do some work with Access. I do not know much about it except for the DB part. Questions: *1* I am looking for INTENSIVE books to get quickly up to...
3
by: J Krugman | last post by:
I'm trying to read some source code that makes very heavy use of macros and other pre-processor directives. To make matters worse, macro definitions are stacked several layers deep (i.e. macros...
3
by: [Yosi] | last post by:
I have some unreasonable issue while reading access component from other thread. I have a Form class which includes TreeView, this tree view includes some TreeNodes , lets say 2 . In my Form...
13
by: nuti | last post by:
Hi all, I am fairly new to VB.I am trying to figure out as how to write a script so that i can read the data from an excel sheet to Access. can u guys please help me out? cheers, nuti
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.