Calling a VBA Routine

  • Thread starter Thread starter MarkS
  • Start date Start date
M

MarkS

Hi,

I have a button on a form which I want to run a piece of VBA code. It is in
a module called mdl_Control and the routine is called Control
How do I do this

Thanks MarkS
 
Note that Control is a reserved word in ACCESS, so it's possible that you
will get errors with your attempt. I strongly urge you to change the name of
the "routine" to something other than Control. Change it to ControlRoutine.
Then use the button's Click event to run VBA code similar to this:

Private Sub ButtonName_Click()
Call ControlRoutine
End Sub
 
Back
Top