The simplest is to copy the code in a public procedure and call the
procedure from form A and B as necessary. If you insist on using the
event code for the button, I'd like to hear why before going into how to
do it.
Remove the "Private" keyword from the declaration of the procecure, e.g.:
Private Sub MyButton_Click()
You can now call it like this:
Form_A.MyButton_Click
Note that "Form_A" is the name of the module for a form named "A".
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.