-1

Run-time sending click command to a similar command-button named cmd1 is so easy from another control:

 cmd1_Click

But this similar type not works when we're going to send this command from another form, there. For example by:

 Form2.cmd1_Click

Then for this time we used to write:

 Form2.cmd1.value = True

But now my question is for when this command-button is an array of controls. How we can code this doing one?

OldBoyCoder
  • 876
  • 6
  • 16
  • 1
    At a guess without a VB6 compiler at hand Form2.cmd1(0).value = True. Or move your code from out of the event handler into a Public Sub and call the code from both your other form and the event handler. – OldBoyCoder May 21 '16 at 06:25
  • Wow! Yes it works. but i had been test it, for several times before this time but the option of Value property doesn't shown in VS-helping dialog box, and now in this new test, too. – user4616661 May 30 '16 at 05:23
  • Thanks a lot for your help! It was so useful to me! – user4616661 May 30 '16 at 05:25

1 Answers1

0

Comment turned to a an answer as the OP is happy with the response.

Equivalent for an array of controls is:

Form2.cmd1(0).value = True. 

Or move your code from out of the event handler into a Public Sub and call the code from both your other form and the event handler

OldBoyCoder
  • 876
  • 6
  • 16