• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

ComboBox'tan seçilen veriye göre TextBox rengi

  • Konbuyu başlatan Konbuyu başlatan teksen
  • Başlangıç tarihi Başlangıç tarihi
Katılım
6 Mart 2006
Mesajlar
251
Herkese iyi çalışmalar,

Ekte gönderdiğim dosyada bulunan UserForm üzerinde, 'kırmızı' renkli olan TextBox'lar yan taraflarında bulunan ComboBox'lardan 'ödendi' seçildiğinde renk değiştirebilirmi acaba?

Bunun için hangi kodu kullanmamız gerekiyor.Ben malesef çözemedim.

Şimdiden teşekkür ederim.
 
Ekli dosyayı inceleyiniz.:cool:
Kod:
Private Sub ComboBox2_Change()
If ComboBox2.Value = "Ödenmedi" Then
    TextBox5.BackColor = RGB(248, 52, 24)
    TextBox6.BackColor = RGB(248, 52, 24)
    TextBox7.BackColor = RGB(248, 52, 24)
End If
If ComboBox2.Value = "Ödendi" Then
    TextBox5.BackColor = RGB(123, 187, 89)
    TextBox6.BackColor = RGB(123, 187, 89)
    TextBox7.BackColor = RGB(123, 187, 89)
End If
End Sub
Kod:
Private Sub ComboBox3_Change()
If ComboBox3.Value = "Ödenmedi" Then
    TextBox5.BackColor = RGB(248, 52, 24)
    TextBox6.BackColor = RGB(248, 52, 24)
    TextBox7.BackColor = RGB(248, 52, 24)
End If
If ComboBox3.Value = "Ödendi" Then
    TextBox5.BackColor = RGB(123, 187, 89)
    TextBox6.BackColor = RGB(123, 187, 89)
    TextBox7.BackColor = RGB(123, 187, 89)
End If

End Sub
Kod:
Private Sub ComboBox4_Change()
If ComboBox4.Value = "Ödenmedi" Then
    TextBox5.BackColor = RGB(248, 52, 24)
    TextBox6.BackColor = RGB(248, 52, 24)
    TextBox7.BackColor = RGB(248, 52, 24)
End If
If ComboBox4.Value = "Ödendi" Then
    TextBox5.BackColor = RGB(123, 187, 89)
    TextBox6.BackColor = RGB(123, 187, 89)
    TextBox7.BackColor = RGB(123, 187, 89)
End If

End Sub
 
Geri
Üst