Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scope of procedures
Message
From
02/08/1999 08:12:57
 
 
To
01/08/1999 16:01:43
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00248704
Message ID:
00248773
Views:
14
>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.
Guy Barrette, MCSD
============
Blog http://weblogs.asp.net/guybarrette
Microsoft Regional Director, Montreal, Canada www.microsoft.com/rd
MVP, ASP.NET http://mvp.support.microsoft.com/
President, Montreal Visual Studio User Group www.guvsm.net
INETA Regional Rep for Quebec www.ineta.org
UniversalThread Magazine Columnist (.NET Books Review Column) www.utmag.com
Tech Chair French Track, DevTeach 2004 & 2005 www.devteach.com
Business Architect, Microsoft Team - Nurun Inc www.nurun.com
XBox Live Gamer Tag: Slomo QC CA
Previous
Reply
Map
View

Click here to load this message in the networking platform