• DİKKAT

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

Soru UserForm1.Height ayarı

sirkülasyon

Altın Üye
Katılım
10 Temmuz 2012
Mesajlar
2,543
Excel Vers. ve Dili
2021 LTSC TR
togglebutton ile
userformun açıldığı zaman Height değeri 219
butonu çalıştırınca da Height değeri 485
olarak açılmasını nasıl ayarlaya bilirim?
 
Merhaba;

Userform kod kısmına;

Private Sub UserForm_Activate()
UserForm1.Height = 219
End Sub

Private Sub CommandButton1_Click()
UserForm1.Height = 485
End Sub

Kodlarını ekleyerek deneyin.
İyi çalışmalar.
Not: Ben CommandButton1 e bağladım. siz togglebutton 'a bağlayın
 
Yada ToggleButton kontrollü;

Private Sub UserForm_Activate()
UserForm1.Height = 219
ToggleButton1.Caption = "A K T İ F " 'buton üzerindeki yazı
ToggleButton1.BackColor = QBColor(10) 'buton rengi
ToggleButton1.ForeColor = QBColor(1) 'buton yazı rengi
ToggleButton1.FontBold = True 'buton yazısı bold
End Sub

Private Sub ToggleButton1_Click() 'toggle buton işlemi
If ToggleButton1.Value = True Then
ToggleButton1.Caption = "A K T İ F " 'buton üzerindeki yazı
ToggleButton1.BackColor = QBColor(10) 'buton rengi
ToggleButton1.ForeColor = QBColor(1) 'buton yazı rengi
ToggleButton1.FontBold = True 'buton yazısı bold
UserForm1.Height = 485
Else
ToggleButton1.Caption = "P A S İ F "
ToggleButton1.BackColor = QBColor(7)
ToggleButton1.ForeColor = QBColor(12)
ToggleButton1.FontBold = False
UserForm1.Height = 219
End If
End Sub

İyi çalışmalar.
 
Sayın muygun
Çok çok teşekkür ederim. Ellerinize sağlık
 
Geri
Üst