• DİKKAT

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

Toggle Buton Kullanımı

Katılım
15 Nisan 2009
Mesajlar
197
Excel Vers. ve Dili
Office 2010 Tr
Arkadaşlar 2 tane option butonum var.option buton 2 seçimi iptal ediyor,option buton 1 hepsini seçiyor.Ben 2 tane option buton yerine togle buton kullanmak istiyorum.Bu koda toggle butonu nasıl ekleyebilirim

Private Sub OptionButton2_Click()
Dim i As Integer
If ListBox2.ListCount < 1 Then Exit Sub
For i = 0 To ListBox2.ListCount - 1
ListBox2.Selected(i) = False
Next
End Sub

Private Sub OptionButton1_Click()
Dim i As Integer
If ListBox2.ListCount < 1 Then Exit Sub
For i = 0 To ListBox2.ListCount - 1
ListBox2.Selected(i) = True
Next
End Sub
 
bu kodlarla çalışan dosyanızı ekleseniz.
ona göre düzenleme yapsak
 
İyi akşamlar, aşağıdaki şekilde deneyebilirsiniz.


Kod:
Private Sub ToggleButton1_Click()
If ToggleButton1.Value = 0 Then
  ToggleButton1.Caption = "Pasif"
  'kodlarınız
  Else
  ToggleButton1.Caption = "Aktif"
  'kodlarınız
  End If
End Sub
 
Geri
Üst