We help IT Professionals succeed at work.

How to programmtically press the button in VB 6

Medium Priority
353 Views
Last Modified: 2012-05-06
i have two buttons: button One and Button Two
to make long story short : i want to use Button One to press button Two

i have visual basic 6.0
Comment
Watch Question

Database Architect / Application Developer
CERTIFIED EXPERT
Top Expert 2007
Commented:

Private Sub btnOne_Click()
    Me.btnTwo_Click
End Sub

Public Sub btnTwo_Click()
    MsgBox "I AM Btn Two"
End Sub

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Application Developer
CERTIFIED EXPERT
Top Expert 2007

Commented:
Or .. with both Private Subs

Private Sub btnOne_Click()
    Call btnTwo_Click
End Sub


Public Sub btnTwo_Click()
    MsgBox "I AM Btn Two"
End Sub

Author

Commented:
thanks for such a quick respond. i will check tomorrow the very first thing in the morning
:)))
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Application Developer
CERTIFIED EXPERT
Top Expert 2007

Commented:
oooooook
also,
Button1.value=true

Author

Commented:
thanks a lot
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.