Yaptığım bir çalışmada kullanmak istediğim bir özellik var. Arama yaptırdım ama bulamadım.Checkbox işaretlendiği zaman textbox'u pasif edecek kodu yazabilir misiniz? Yardımlarınız için çok teşekkür ederim.
Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
TextBox1.Enabled = False
Else
TextBox1.Enabled = True
End If
End Sub
Private Sub CheckBox1_Click()
TextBox1.Enabled = TextBox1.Enabled = 0
End Sub
Private Sub CheckBox1_Click()
TextBox1.Enabled = TextBox1.Enabled = 0
If CheckBox1 Then
TextBox1.BackColor = &H80000004
Else
TextBox1.BackColor = &H80000005
End If
End Sub
Private Sub CheckBox1_Click()
TextBox1.Enabled = Not CheckBox1.Value
TextBox1.BackColor = IIf(CheckBox1, &H80000004, &H80000005)
End Sub
Çok soru sormuş gibi olmayayım ama son bir soru olarak textbox'a girilen 04042008 sayının enter veya taba basınca 04.04.2008 olarak gözükmesini nasıl sağlarım acaba?
Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
Dim deg As String
If KeyCode = 13 Or KeyCode = 9 Then
If Len(TextBox1.Value) = 8 Then
deg = Left(TextBox1.Value, 2) & "."
deg = deg & Mid(TextBox1.Value, 3, 2) & "."
deg = deg & Right(TextBox1.Value, 4)
TextBox1.Value = deg
End If
End If
End Sub
Private Sub TextBox1_AfterUpdate()
Me.TextBox1 = Format(Me.TextBox1, "00\.00\.0000")
End Sub
Benim kodlarım textbox1 için yazılmıştır,siz hangi textbox için uyguluyacaksanız textbox1 yazan yerlere kendi textbox'ın ismini yazınız.Runtime error '424';
object reguired
hatası verdi yeni eklediğim kodları sildim ama gitmiyor