Macros - how to convert them all

M

M Skabialka

Access 2007. I am using a template from MS but hate the macros everywhere.
I converted the ones on the forms to code, but can't find a button on the
ribbon to convert a series of macros listed in the Navigation Pane. In
older Access versions you could save macros as vba code easily.
Also, when I use a wizard to add a button to my form, it writes macro code,
not VBA. Is there an option to create VBA code instead of macros?
Mich
 
A

Arvin Meyer MVP

Also, when I use a wizard to add a button to my form, it writes macro
code, not VBA. Is there an option to create VBA code instead of macros?

Yes, just cancel the wizard and write the code. I wrote a generic function
to which I only need to pass the form name:

Public Function OpenFrm(strForm As String)

On Error Resume Next
DoCmd.OpenForm strForm

End Function

You can add better error handling, but I don't think that's necessary. If
you add arguments, so that it performs all the functions of the original VBA
code, adding error handling makes more sense.

For some reason, Microsoft believes that Macros are safer than VBA for
security reasons. While abstractly that may be true, in reality it is code,
and only code, which creates a powerful application.
 
M

M Skabialka

I tried to use Save as whcih worked in previous versions:
Office button - Save as - Save object as
I gave it a name, and chose As Module, then got this message:

The Macro Conversion Wizard can't be started. This wizard may not be
installed, or this
wizard has been disabled. To reenable this wizard, click the Microsoft
Office Button, and then
click Access Options. Click Add-Ins, and then in the Manage list, click
Disabled Items, and then
click Go. Rerun Microsoft Office Access or the Microsoft Office Setup
program to reinstall this
wizard. If you want to preserve your security or custom settings, back up
the Microsoft Office
Access workgroup information file.
For more information on backing up files, search for 'backing up files' in
Microsoft Windows Help.

I followed these instructions and there are no disabled items. Two were
inactive: WZCNF.DLL and ACECNF.DLL - both resolve replications conflicts
with SQL server.
I looked in Help for 'backing up files' and found 100+ articles, which as
usual provide no assistance for this particiular problem.

How do I enable the Macro Conversion Wizard? The macro object runs about
100 or so lines, and some of them have unfathomable commands that I do not
understand.
 

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