Don't forget that an instance of the Form must be open (though it may
be hidden or minimised) for you to be able to access a Control or
Public Function on it.
Remove the Private keyword, and call the event procedure like this:
Call Form_Form1.cmdCancel_Click
That's calling the On Click event procedure for a button named cmdCancel on
Form1.
Rather than having a Sub on a Form and calling this Sub
from another Form, it would be better to created a
Function inside a module then Call the module from both
Forms. When you call a Module in this manner you do not
need an instance of the original Form to be open.
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.