VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Clear/Change caption on all labels/command buttons, text on all textboxes or simply doing an event

by Lord Icon ( Ericson L.) (1 Submission)
Category: String Manipulation
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Fri 28th April 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Clear/Change caption on all labels/command buttons, text on all textboxes or simply doing an event on all controls in form in just one

API Declarations


'or snail mail
'Ericson Liwanag
'AMA Computer Learning Center
'Pagdaraoan, San Fernando City
'La Union 2500
'Philippines

Rate Clear/Change caption on all labels/command buttons, text on all textboxes or simply doing an event




Private Sub Command1_Click()
    For Each controlx in Form1.Controls
    'Clearing all text in Textbox in the said Form
    If TypeOf controlx is Textbox Then controlx.Text = ""
    'Clearing all caption in Labels in the said Form
    If TypeOf controlx is Label Then controlx.Caption = ""
    'Changing Caption of all Command Buttons in the said Form
    If TypeOf controlx if CommandButtons Then controlx.Caption = "Click"
    Next controlx
End Sub



Download this snippet    Add to My Saved Code

Clear/Change caption on all labels/command buttons, text on all textboxes or simply doing an event Comments

No comments have been posted about Clear/Change caption on all labels/command buttons, text on all textboxes or simply doing an event . Why not be the first to post a comment about Clear/Change caption on all labels/command buttons, text on all textboxes or simply doing an event .

Post your comment

Subject:
Message:
0/1000 characters