??Calling Sub-Menu_Click from Module Level Procedures??? 
Author Message
 ??Calling Sub-Menu_Click from Module Level Procedures???

I have tried all the normal possible ways for calling Deal_Click from within
the main form and it works, but how to call it from a Module level procedure
some how escapes me. I would just change from a module level to a form level
procedure but I can't it has to be in a module. The Menu Name is Game and the
Sub-Menu is Called Deal and I want to calls the Deals Click Event and the
forms name is just Form1 .... :) :)

Mike

Thanks in advance..



Mon, 29 Dec 1997 03:00:00 GMT  
 ??Calling Sub-Menu_Click from Module Level Procedures???

Quote:
>I have tried all the normal possible ways for calling Deal_Click from within
>the main form and it works, but how to call it from a Module level procedure
>some how escapes me. I would just change from a module level to a form level
>procedure but I can't it has to be in a module. The Menu Name is Game and the
>Sub-Menu is Called Deal and I want to calls the Deals Click Event and the
>forms name is just Form1 .... :) :)

You can't call subs in forms from other modules. Why not put the code in
code in the Deals click event in a module?
--
_________________________________________________________
Robert Woodcock | Note: Your standard disclaimers apply. |

................| it can be quite a curse) - Plucky Duck |


Mon, 29 Dec 1997 03:00:00 GMT  
 ??Calling Sub-Menu_Click from Module Level Procedures???

: I have tried all the normal possible ways for calling Deal_Click from within
: the main form and it works, but how to call it from a Module level procedure
: some how escapes me. I would just change from a module level to a form level
: procedure but I can't it has to be in a module. The Menu Name is Game and the
: Sub-Menu is Called Deal and I want to calls the Deals Click Event and the
: forms name is just Form1 .... :) :)

: Mike

: Thanks in advance..

The best way to do this is put the code in the module and call that sub from
Deal_Click. If this won't work put a hidden button (set visable to false) on
the form and call Deal_Click from the click event of this button. When you
want to call Deal_Click from module level set the button's value to true
(Form1.Command1.Value = True) and this will triger the click event of the
button.

--
Gary Gilbert



Tue, 30 Dec 1997 03:00:00 GMT  
 ??Calling Sub-Menu_Click from Module Level Procedures???

Quote:
>I have tried all the normal possible ways for calling Deal_Click from within
>the main form and it works, but how to call it from a Module level procedure
>some how escapes me. I would just change from a module level to a form level

That is because you can't call it that way.  You can access controls on forms from
module level procedures, but you can not call event procedures from outside
the form that they appear on.


Wed, 31 Dec 1997 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. dim at procedure level or module level

2. Bad Calling Convention error 49 - due to calling a Sub in a .bas module

3. canceling through multiple levels of sub procedures in VB

4. Module Level Versus Subroutine Level

5. module sub called from within form

6. Calling a Sub in Another Form vs a Module

7. calling a sub inside a usercontrol from a module

8. calling a sub inside a usercontrol from a module

9. calling a sub inside a usercontrol from a module

10. How to call a sub defined in DLL module not belong to any class

11. How to cancel a large multiple level procedure from several levels in

12. call sub procedure

 

 
Powered by phpBB® Forum Software