Macros to VB


Posted by Leon Miller on March 14, 2001 6:53 AM

Is it possible to convert A macro to pure VB code, and is it worth it ??? If so how can I do it

Posted by Roger Redhat on March 14, 2001 8:09 AM

A macro IS pure VBA code and is interpreted into machine code every time it is run. I assume you mean that you'd like to turn a macro into an executable file. This is only possible through MS Visual Basic where you can create COM add-ins (DLL files) and other DLL's that can be called and run from within Excel.

Regards,
Roger.

Posted by Leon Miller on March 16, 2001 1:59 AM

Roger, what i meant is, I have a load of macro's, and what them to be just modules, without appearing in the macro list, but still be able to call them. Any help.



Posted by Roger Redhat on March 18, 2001 1:33 PM

If you want your macros to not be available in the Macros dialog box you just prefix your procedure name with the word private.

e.g.
Private Sub AnyMacro

However, this means that you cannot call the macro outside of the component in which it is contained.

Regards,
Roger.