Hi Touf,
For the most part I've gotta agree with Jerry. Unless you are testing your
button routine what he recommended is ideal. However since you asked I'll go
ahead and tell ya:
If I wanted to click a menu item from a button I'd just put the following
code in a button
mnuOpenGame_Click(sender, e)
so to simulate a button click it's almost identical
btnOpen_Click(sender, e).
Cheers,
Christian Blackburn
"Jerry" <Je*********@yahoo.com> wrote in message
news:Os**************@TK2MSFTNGP10.phx.gbl...
There are a number of ways to do this.
Most likely the most straight forward way would be to have a subroutine
which performs the desired code you wish to run. Then, you can call this
subroutine either by calling it from the button event or from your other
code.
You dont want to raise the button event, you want to run the code which
the button causes.
Regards
"touf" <to******@hotmail.com> wrote in message
news:Oz*************@tk2msftngp13.phx.gbl... Hi,
How can I invoke by code a buttoin click event.
I like to call the function that handles the button click.
I'\ve seen the command RAISEEVENT but I didn't know how to use it ion
this case.
Thanks