I have a checkbox and multiple textbooks let say about 10.When the checkbox=true , i will be able to write data inside. if checkbox=false, it will be lock. THe code below work when only i click the button. How do i make it work immdiately upon when the checkbox=false?
Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
TextBox1.Enabled = True
Else
TextBox1.Enabled = False
End If
If CheckBox1.Value = True Then
TextBox2.Enabled = True
Else
TextBox2.Enabled = False
End If
If CheckBox1.Value = True Then
TextBox3.Enabled = True
Else
TextBox3.Enabled = False
End If
If CheckBox1.Value = True Then
TextBox4.Enabled = True
Else
TextBox4.Enabled = False
End If
End Sub
Private Sub CommandButton1_Click()
Sheet1.Range("E7").Value = TextBox1.Value
Sheet1.Range("E8").Value = TextBox3.Value
Sheet1.Range("E9").Value = TextBox5.Value
Sheet1.Range("E10").Value = TextBox7.Value
Sheet1.Range("E11").Value = TextBox9.Value
Sheet1.Range("E7").Value = TextBox2.Value
Sheet1.Range("E7").Value = TextBox4.Value
Sheet1.Range("E7").Value = TextBox6.Value
Sheet1.Range("E7").Value = TextBox8.Value
Sheet1.Range("E7").Value = TextBox10.Value
End Sub
Go www.cashcrate.com/3866888 to earn cash online!!!
Bookmarks