all macros --> VBA in VBA

Darth Vodka

Registered User.
Local time
Today, 00:09
Joined
Sep 25, 2007
Messages
344
hi

is it possible to convert all macros into VBA in VBA?

i thought maybe the CurrentProject.Allmacros but can't find a convert method

then i thought maybe Docmd.something, but no luck...

:(
 
Should be a menu option, I believe... Tools -> Macros -> Convert Macros to VB. Can you multiselect macros and do that?

Am sure that docmd has something for that... if you google for "DoCmd constants" you can find some websites that has a listing of various stuff you can do with it...
 
Tools on Form Design allows for conversion of all macros on the form.

I tried that once but nothing worked, the form just froze, so make a copy first:D The message came through that convserion was done and I could open the form but any label/button I clicked on produced no result.

However, the couple of forms I tried it on had several macros listed that were no longer in the data base. They would have been on old unbound textboxes that were given zero dimensions and no longer used. That may have been the problem.

Also, the conversion to code (modules) won't always work if the macro has a lot of conditions....the IF in the code seems to foul up, but not always and it mainly seems to be on big macros.
 
Just one more reason to not use macros.


Sorry, can't help myself. Can you tell I'm suffering from PTSD, no thanks to macros? :D
 
Just one more reason to not use macros.


Sorry, can't help myself. Can you tell I'm suffering from PTSD, no thanks to macros? :D

I use them all the time except when they can't do what is required.:) which for me is not often except mainly for Access to Word Bookmarks and Word docs embedded in OLE fields extracted and put back into normal Word. Otherwise, macros all the way:D
 
Check out the ConvertMacro Function by datAdrenaline. You can find it here.

.

aah, many thanks

doesn't quite work for me, but i think i can correct it

using sendkeys....ha, never thought of that, always feels kind of wrong

many thanks CyberLynx
 
I personally hate using SendKeys and avoid it like the plague but...I tried datAdrenaline's function and it worked for the most part. I can't think of any other way (at the moment) to do this. And to be honest....I really don't care to :D

.
 

Users who are viewing this thread

Back
Top Bottom