Calling one event from another event
Hello all,
I Wish to call Button1_click event of Form1 in Button2_Click event of Form2.
i.e Calling event of one form into evnet of other form.
How can I achieve this?
Thanks.
29 Minutes
Discussion Span
Rahul47
Junior Poster in Training
84 posts since Jan 2013
Reputation Points: 0
Solved Threads: 1
Skill Endorsements: 0
try this Form1.Button1.PerformClick(). Put this in the click event of the button on form 2.
tinstaafl
Nearly a Posting Virtuoso
1,472 posts since Jun 2010
Reputation Points: 429
Solved Threads: 262
Skill Endorsements: 14
oops almost forgot. the form might have to be showing first. A better solution might be to put the code in a public sub and let each button call it.
As usual don't forget to mark solved problems solved :)
tinstaafl
Nearly a Posting Virtuoso
1,472 posts since Jun 2010
Reputation Points: 429
Solved Threads: 262
Skill Endorsements: 14
@tnstaafl: hey, thanks that really works.....
so how do i mark your answer as solved ???
Am kinda new in here !!
:P :P
Rahul47
Junior Poster in Training
84 posts since Jan 2013
Reputation Points: 0
Solved Threads: 1
Skill Endorsements: 0
Question Answered as of 5 Months Ago by
tinstaafl