1,105,352 Community Members

Calling one event from another event

Member Avatar
Rahul47
Posting Whiz
340 posts since Jan 2013
Reputation Points: 13 [?]
Q&As Helped to Solve: 20 [?]
Skill Endorsements: 2 [?]
 
0
 

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.

Member Avatar
tinstaafl
Postaholic
2,012 posts since Jun 2010
Reputation Points: 559 [?]
Q&As Helped to Solve: 402 [?]
Skill Endorsements: 35 [?]
 
0
 

try this Form1.Button1.PerformClick(). Put this in the click event of the button on form 2.

Member Avatar
tinstaafl
Postaholic
2,012 posts since Jun 2010
Reputation Points: 559 [?]
Q&As Helped to Solve: 402 [?]
Skill Endorsements: 35 [?]
 
0
 

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 :)

Member Avatar
Rahul47
Posting Whiz
340 posts since Jan 2013
Reputation Points: 13 [?]
Q&As Helped to Solve: 20 [?]
Skill Endorsements: 2 [?]
 
0
 

@tnstaafl: hey, thanks that really works.....

so how do i mark your answer as solved ???
Am kinda new in here !!
:P :P

Question Answered as of 1 Year Ago by tinstaafl
You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article