-
Is there a way to trigger an event on another form when that form isn't active? I've got a program with an MDI form and a few children, and I want to be able to fire an event in one of the children when the MDI form has the focus. (Specifically using an MDI menu to press a toolbar button on one of the child forms). I know that properties can be set with the syntax Form!Object.Property = Value, but that same thing won't work for firing events. Is it possible to do this?
-
Just change it from Private Sub to Public Sub, for example:
Code:
Public Sub Command1_Click()
MsgBox "Hello"
End Sub
Then from another Form, you can use:
Code:
Call Form2.Command2_Click()
-
Code:
Command1.Value = True
will also trigger the commandbutton click event without setting it public