[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 126
  • Last Modified:

How do I make one form press a button on anothe form?

I know that command1_click will press a button on the current form.

What code on Form1 will press a button on Form2?



0
rbend
Asked:
rbend
  • 2
1 Solution
 
vb_elmarCommented:
in Form1:
____________________

Private Sub Form_Load()
Form2.makeAclick
End Sub

in Form2:
____________________

Private Sub Form_Click()
End
End Sub

Sub makeAclick()
Form_Click
End Sub
0
 
rbendAuthor Commented:
thanks.
0
 
vb_elmarCommented:
correction:

instead:
Sub makeAclick()
Form_Click
End Sub

use:
Sub makeAclick()
Command1_Click
End Sub
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now