I convereted a macro to VBA, how do I point a control to the code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I convereted a macro to VBA, but now I just have the original macro and a new
module name "convereted macro-blahblah". I have a control whose event
procedure "on click" is still looking at the the macro. How do I tell the
control to look at the new converted macro-module so I can remove the macros?
 
Change what's in the On Click event for the form to [Event Procedure]
(select it from the pull-down list), then click on the ellipsis to the right
(...). That will take you into the VB Editor, inside the actual code for
that event. You can either copy-and-paste the converted code into that
procedure (do not copy the Sub or End Sub from the converted macro!), or you
can simply call your converted macro from that event.
 
Back
Top