Excel old style 4.0 macro

L

Luch

I have two questions -
1)Is there any way to convert Excel 4 macros to VBA, and
2) I have inherited a macro written in Excel 4.0. It is a
periodically done routine to move dated numbers into a "previous"
column, clear out the cells for new entries. It had been working fine
on WinNT2000, Excel 2000, but somehow, the latest one I received has a
glitch: there are two macros in the file, and each macro has been
duplicated, for a total of four macros. When the button for the
associated macro is pressed, the message "The macro
'Filename.xls'!'MacroName' cannot be found" appears. It appears to me
that the duplicate macro ranges is causing the problem. If so, how do
I get rid of them? I try deleting the range names, but they still
appear in the Tools/Macro dialog box. Thanks for any help.
 
T

Tom Ogilvy

No, there is no automatic converter. They operate very differently. You
would need to understand the functionality of the xl4 macro, then
conceptualize how to do the same "work" in VBA. Then write the code.

If you performed the same actions manually with the macro recorder on, you
would probably get vba code closest to the xl4 macro, but this is generally
considered pretty inefficient.
 
D

Dave Peterson

Until you convert the old macros to VBA, maybe you could just reassign the
buttons to the macro that you want. I'm betting that if it's XLM code, the
buttons are from the Forms toolbar.

Try rightclicking on the button, then Assign macro, the point at the one you
want (for each button).

(maybe you could even clean up the the duplicated macros, too. It might make it
less confusing later.)
 

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