1,105,581 Community Members

command button function

Member Avatar
masterfact18
Light Poster
43 posts since Jan 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
0
 

hi everyone...

my problem is i got 2 command button named command1 and command2..what i want to happen is when command2 is click the function of command1 will work...

can someone please help me...

Member Avatar
rishif2
Posting Whiz in Training
284 posts since Dec 2012
Reputation Points: 57 [?]
Q&As Helped to Solve: 58 [?]
Skill Endorsements: 4 [?]
 
0
 

just call command1 event proceudre on command2_click event and so write there

command1_click

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

In VB6 you can call the event handler the same as any sub, just use Command1_Click in the Click handler for Command2. It's probably cleaner to make the code in Command1 a separate sub routine or function and call it from each button. If you decide to change things down the road, this way will make it easier.

Question Answered as of 1 Year Ago by tinstaafl and rishif2
Member Avatar
masterfact18
Light Poster
43 posts since Jan 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
0
 

thank you Mr. Rishif2!! now i got it and its working...

You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: