• DİKKAT

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

CheckBoxla userformda label,combobox ve textboxu pasif yapma

Katılım
1 Ocak 2008
Mesajlar
115
Excel Vers. ve Dili
türkçe 2003
arkadaşlar merhaba hemen konuya girmek istiyorum userformda CheckBox1 işaretlediğimde örnegin label1,label2,abel3,label4,label5,label6,combobox1,combobox2,combobox3,combobox4 ve textbox4,textbox9,textbox15,textbox20 nasıl pasif duruma getiririm ve textbox10 da "YÜZÜNE" ifadesini yazdırırım..şimdiden teşekkürler.
 
Kod:
Private Sub CheckBox1_Click()
If CheckBox1 Then
Label1.Enabled = False
TextBox1.Enabled = False
........
........ buralara istediginiz labellari vs yazin
.......
textbox10="YUZUNE"
End If
End Sub
 
Kod:
Private Sub CheckBox1_Click()
If CheckBox1 Then
Label1.Enabled = False
TextBox1.Enabled = False
........
........ buralara istediginiz labellari vs yazin
.......
textbox10="YUZUNE"
End If
End Sub


çok teşekkür ederim istediğim gibi ama tekşey eksik userformda görülsün istemiyorum onu nasıl yapabilirim...
 
Selamlar,

Aşağıdaki kodu denermisiniz.

Kod:
Private Sub CheckBox1_Click()
    If CheckBox1 = True Then
    Label1.Visible = False
    Label2.Visible = False
    Label3.Visible = False
    Label4.Visible = False
    Label5.Visible = False
    Label6.Visible = False
    ComboBox1.Visible = False
    ComboBox2.Visible = False
    ComboBox3.Visible = False
    ComboBox4.Visible = False
    TextBox4.Visible = False
    TextBox9.Visible = False
    TextBox15.Visible = False
    TextBox20.Visible = False
    TextBox10 = "YÜZÜNE"
    Else
    Label1.Visible = True
    Label2.Visible = True
    Label3.Visible = True
    Label4.Visible = True
    Label5.Visible = True
    Label6.Visible = True
    ComboBox1.Visible = True
    ComboBox2.Visible = True
    ComboBox3.Visible = True
    ComboBox4.Visible = True
    TextBox4.Visible = True
    TextBox9.Visible = True
    TextBox15.Visible = True
    TextBox20.Visible = True
    TextBox10 = ""
    End If
End Sub
 
Alternatif :
Kod:
Private Sub CheckBox1_Click()
If Me.CheckBox1 Then
Me.Frame1.Visible = True
Me.CheckBox1.Caption = "Gizle"
Else
Me.Frame1.Visible = False
Me.CheckBox1.Caption = "Göster"
End If
End Sub

Private Sub UserForm_Initialize()
Me.Frame1.Visible = False
Me.CheckBox1.Caption = "Göster"
End Sub
 
sayın hocalarım çok teşekkürler herzamanki gibi sayenizde yeni birşey daha öğrenmiş oldum.....
 
Geri
Üst