>I have a project with a module and several forms. The module has Sub Main in it from which I want to be able to click a menu item from one of the forms. I have the following code in the main module:
>
>Sub Main
> Load myForm
> ...
> myForm.Show
> ...
> mnuMyMenuItem_Click
> ...
>End Sub
>'
>The mnuMyMenuItem_Click routine is, of course, in the module for the form myForm. I get an error that says the function or procedure is not found. How can I reference code in a form module from another module? Sorry if this is super basic - I'm a newbie. TIA,
>Bob Alei
>
BAleiHi@jps.net (please email response)
You can reference a sub or function like this:
myForm.mnuMyMenuItem_Click
Make sure that the sub is declared Public and not Private.