VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Access Stuff From Other Forms

by SeeD (22 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Date Added: Wed 3rd February 2021
Rating: (3 Votes)

This just shows how to access CommandButton's, Label's etc.. from another Command or label. So when you click Form1's Command, you can actually be clicking Form2's command. Very useful for shortcuts.

Inputs
1. make 2 forms 2. make a command button on each form
Code Returns
returns the action of the other command button

Rate Access Stuff From Other Forms

'So you have your 2 forms? Good. 
'Use the code below in the specified 
'areas...

  Private Sub Command1_Click()
    Form2.Command1.Value = True
  End Sub

'That goes in form1's command button. Just add an action to the command button on form 2 to work it!

Download this snippet    Add to My Saved Code

Access Stuff From Other Forms Comments

No comments have been posted about Access Stuff From Other Forms. Why not be the first to post a comment about Access Stuff From Other Forms.

Post your comment

Subject:
Message:
0/1000 characters