Referring to a sub from another module

  • Thread starter Thread starter Rick
  • Start date Start date
R

Rick

How do I call an event sub (cmdDelete_Click) that is part of a UserForm modules from another module,
say the Main mod?

frmUserFields.cmdDelete_Click()?

I am trying to avoid writing code that I already amy using...or would it make more sense to write
the code for the cmdDelete_Click event as a shared sub and call it from the Main Mod by the form's
event sub, and whoever else needs it?

Thanks,

Rick B
 
You can't call an event macro. As you suggested, pull your code out into
a common regular module and call it from both the event macro and
whatever other sub you'd like.
 
Back
Top