Connecting Tech Pros Worldwide Forums | Help | Site Map

Please help!

Newbie
 
Join Date: Oct 2009
Posts: 1
#1: 4 Weeks Ago
HI, anyone know how to invoke a button click when my label display a text? I need the coding. thanks

Newbie
 
Join Date: Oct 2009
Posts: 19
#2: 4 Weeks Ago

re: Please help!


dear,

Just call the function "..._Click" name like:

make a form with:
combobox = combo1
label= label1
command= com_green
command= com_red
shape= shape1
===============================

Private Sub Form_Load()
Dim i As Integer
'§ populate combobox
For i = 1 To 9
Combo1.AddItem (i)
Next
End Sub

Private Sub Combo1_Click()
Label1.Caption = Combo1.Text
End Sub

Private Sub Label1_Change()
If Label1.Caption = "5" Then
Call Com_Red_Click
Else
Call Com_Green_Click
End If
End Sub

Private Sub Com_Green_Click()
Shape1.BackColor = Com_Green.BackColor
End Sub

Private Sub Com_Red_Click()
Shape1.BackColor = Com_Red.BackColor
End Sub
===================================
Attached Files
File Type: zip Change with Label-caption.zip (1.4 KB, 3 views)
Reply