Excel old style 4.0 macro

  • Thread starter Thread starter Luch
  • Start date Start date
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.
 
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.
 
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.)
 
Back
Top