Userformdaki textbox ve comboboxların visible durumuna göre image nesnesini görünür yada gizli yapmak

Katılım
2 Ocak 2010
Mesajlar
32
Excel Vers. ve Dili
2010 Türkçe
Altın Üyelik Bitiş Tarihi
05-09-2021
Merhaba.

Userform üzerinde 2 adet textbox ve 3 adet combobox var.
Comboboxlardan bir tanesinin visible değeri duruma göre bazen false olabiliyor.
Userformda 1 tane de visible değeri başlangıçta false olan image nesnesi bulunuyor.

Benim yapamadığım şu;
Userformda visible değeri true olan tüm combo ve textboxlara bir değer girilmiş ise image visible true olsun, eğer bu combo ve textboxların herhangi birinde değer girilmemiş ise false olsun.

Yani bir giriş formu var ve bu giriş formunda girilmesi gereken tüm değerler girilmiş ise resmin gözükmesi gerekiyor., yok eğer değerlerden herhangi biri girilmemiş ise resim gizli kalacak.

Teşekkürler..
 

cems

Altın Üye
Katılım
2 Eylül 2005
Mesajlar
2,549
Excel Vers. ve Dili
office 2010 tr 32bit
Altın Üyelik Bitiş Tarihi
13-06-2029
www.filebig.net gibi bir dış servera örnek dosya yüklerseniz ,en azından geldiğiniz noktayı anlamak mümkün olurdu.
 
Katılım
2 Ocak 2010
Mesajlar
32
Excel Vers. ve Dili
2010 Türkçe
Altın Üyelik Bitiş Tarihi
05-09-2021
Örnek dosya içindeki userform da detaylı olarak açıkladım.
 

Ekli dosyalar

Katılım
2 Ocak 2010
Mesajlar
32
Excel Vers. ve Dili
2010 Türkçe
Altın Üyelik Bitiş Tarihi
05-09-2021
Üstteki mesajım sanırım yanlış anlaşıldı. Detaylı olarak açıkladım derken aslında sorumu detaylı olarak açıkladım demek istedim.
Yani sorumun yanıtını hala bulamadım..
 
Katılım
2 Ocak 2010
Mesajlar
32
Excel Vers. ve Dili
2010 Türkçe
Altın Üyelik Bitiş Tarihi
05-09-2021
Excel uzmanlarımızdan olumlu yada olumsuz bir görüş alabilsem çalışmamı ona göre yonlendirecektim.
Vakit ayırıp ilgileneceklere şimdiden çok teşekkür ederim
 
Katılım
2 Ocak 2010
Mesajlar
32
Excel Vers. ve Dili
2010 Türkçe
Altın Üyelik Bitiş Tarihi
05-09-2021
Yanıtsız kalan bir problem olduğu için son bir kez daha güncellemek istedim.
 

YUSUF44

Destek Ekibi
Destek Ekibi
Katılım
4 Ocak 2006
Mesajlar
12,071
Excel Vers. ve Dili
İş : Ofis 365 - Türkçe
Ev: Ofis 365 - Türkçe
Nesnelerin change olayına

Image1.Visible = True

satırı eklemelisiniz.

PHP:
Private Sub ComboBox2_Change()
    If ComboBox2.Value = 2 Then
        ComboBox3.Visible = True
        Image1.Visible = True
    Else
        ComboBox3.Visible = False
    End If
End Sub

Private Sub TextBox2_Change()
    Image1.Visible = True
End Sub
gibi.
 

cems

Altın Üye
Katılım
2 Eylül 2005
Mesajlar
2,549
Excel Vers. ve Dili
office 2010 tr 32bit
Altın Üyelik Bitiş Tarihi
13-06-2029
Comboboxlar bir sabit veri sayfasından değer almalı
 

Ekli dosyalar

Katılım
2 Ocak 2010
Mesajlar
32
Excel Vers. ve Dili
2010 Türkçe
Altın Üyelik Bitiş Tarihi
05-09-2021
Nesnelerin change olayına

Image1.Visible = True

satırı eklemelisiniz.

PHP:
Private Sub ComboBox2_Change()
    If ComboBox2.Value = 2 Then
        ComboBox3.Visible = True

"Yukarıdaki iki olasılık yerine geldiğinde image nesnesi görünür oluyor. benim istediğim "UserForm üzerinde görünür olan tüm text yada comboboxların değer alması halinde image nesnesi görünür olmalı
"ComboBox3 ComboBox2 nin aldığı değere göre gizli yada görünür oluyor. Yani eğer combobox3 de görünür olursa buraya da bir değer girilmeden image nesnesi gözükmesin

        Image1.Visible = True
    Else
        ComboBox3.Visible = False
    End If
End Sub

Private Sub TextBox2_Change()
    Image1.Visible = True
End Sub
gibi.
Yanıt için teşekkürler. Ben dediğiniz gibi yaptım zaten, Bu çalışmayı örnek olsun diye göndermiştim.
Normalde görünür olan combo ve textboxların tamamına değer girdiğimde image nesnesini görünür hale getirdim zaten, ancak ComboBox2 ye "2" değeri girildiğinde ComboBox3 görünür oluyor. Eğer ComboBox3 görünür olduğunda da değer girilmesi halinde image nesnesinin görünmesini nasıl sağlayabiliriz.
sıkıntıyı sizin verdiğiniz kod üzerinde de anlatmaya çalıştım.
 

YUSUF44

Destek Ekibi
Destek Ekibi
Katılım
4 Ocak 2006
Mesajlar
12,071
Excel Vers. ve Dili
İş : Ofis 365 - Türkçe
Ev: Ofis 365 - Türkçe
Kodunuzda combobox3'ün görünür olmasını sağlayan kodun altına image nesnesinin görünün olmasını sağlayan satır ekleyebilirsiniz.

Ekleme: Bu cevabım bir önceki cevabımın aynısı olmuş.

Sorunuzdan başka bir sonuç çıkaramıyorum. Combobox'ın görünme şartını zaten 2 değerinin girilmesine bağlamışsınız. 2 değilse combobox görünmeyecek. Bu durumda image nesnesinin görünmeye devam etmesini mi istiyorsunuz yani? Ayrıca image nesnesi ne zaman görünmeyecek?
 
Katılım
2 Ocak 2010
Mesajlar
32
Excel Vers. ve Dili
2010 Türkçe
Altın Üyelik Bitiş Tarihi
05-09-2021
Image nesnesi başlangıçta zaten gizli.
1. Senaryo
Userform acildiginda 2 textbox ve 2 de combobox geliyor.
Bu combobox ve textboxlarin hepsine bir değer girildiğinde image nesnesi gözükmeli. Yanı herhangi biri boş kalırsa gizli kalmalı.
2. Senaryo
Aynı zamanda Userform açıldığında gizli olarak gelen birde combobox3 var, bu combobox3 ise combobox2 nin aldığı değere göre görünür oluyor. Işte tamda burda image nesnesi eğer combobox3 de görünür olursa da ve içine değer girilirse de görünür olsun, aynı birinci senaryodaki gibi.
 

YUSUF44

Destek Ekibi
Destek Ekibi
Katılım
4 Ocak 2006
Mesajlar
12,071
Excel Vers. ve Dili
İş : Ofis 365 - Türkçe
Ev: Ofis 365 - Türkçe
Userform kodlarını aşağıdakilerle değiştirip dener misiniz?

PHP:
Private Sub ComboBox1_Change()
If ComboBox3.Visible = True Then
    If TextBox1 <> "" And TextBox2 <> "" And ComboBox1 <> "" And ComboBox2 <> "" And ComboBox3 <> "" Then
        Image1.Visible = True
    Else
        Image1.Visible = False
    End If
ElseIf TextBox1 <> "" And TextBox2 <> "" And ComboBox1 <> "" And ComboBox2 <> "" Then
    Image1.Visible = True
Else
    Image1.Visible = False
End If
End Sub

Private Sub ComboBox2_Change()
If ComboBox2.Value = 2 Then
    ComboBox3.Visible = True
Else
    ComboBox3.Visible = False
End If
If ComboBox3.Visible = True Then
    If TextBox1 <> "" And TextBox2 <> "" And ComboBox1 <> "" And ComboBox2 <> "" And ComboBox3 <> "" Then
        Image1.Visible = True
    Else
        Image1.Visible = False
    End If
ElseIf TextBox1 <> "" And TextBox2 <> "" And ComboBox1 <> "" And ComboBox2 <> "" Then
    Image1.Visible = True
Else
    Image1.Visible = False
End If
End Sub

Private Sub ComboBox3_Change()
If ComboBox3.Visible = True Then
    If TextBox1 <> "" And TextBox2 <> "" And ComboBox1 <> "" And ComboBox2 <> "" And ComboBox3 <> "" Then
        Image1.Visible = True
    Else
        Image1.Visible = False
    End If
ElseIf TextBox1 <> "" And TextBox2 <> "" And ComboBox1 <> "" And ComboBox2 <> "" Then
    Image1.Visible = True
Else
    Image1.Visible = False
End If
End Sub

Private Sub TextBox1_Change()
If ComboBox3.Visible = True Then
    If TextBox1 <> "" And TextBox2 <> "" And ComboBox1 <> "" And ComboBox2 <> "" And ComboBox3 <> "" Then
        Image1.Visible = True
    Else
        Image1.Visible = False
    End If
ElseIf TextBox1 <> "" And TextBox2 <> "" And ComboBox1 <> "" And ComboBox2 <> "" Then
    Image1.Visible = True
Else
    Image1.Visible = False
End If
End Sub

Private Sub TextBox2_Change()
If ComboBox3.Visible = True Then
    If TextBox1 <> "" And TextBox2 <> "" And ComboBox1 <> "" And ComboBox2 <> "" And ComboBox3 <> "" Then
        Image1.Visible = True
    Else
        Image1.Visible = False
    End If
ElseIf TextBox1 <> "" And TextBox2 <> "" And ComboBox1 <> "" And ComboBox2 <> "" Then
    Image1.Visible = True
Else
    Image1.Visible = False
End If
End Sub
 
Katılım
2 Ocak 2010
Mesajlar
32
Excel Vers. ve Dili
2010 Türkçe
Altın Üyelik Bitiş Tarihi
05-09-2021
Userform kodlarını aşağıdakilerle değiştirip dener misiniz?

PHP:
Private Sub ComboBox1_Change()
If ComboBox3.Visible = True Then
    If TextBox1 <> "" And TextBox2 <> "" And ComboBox1 <> "" And ComboBox2 <> "" And ComboBox3 <> "" Then
        Image1.Visible = True
    Else
        Image1.Visible = False
    End If
ElseIf TextBox1 <> "" And TextBox2 <> "" And ComboBox1 <> "" And ComboBox2 <> "" Then
    Image1.Visible = True
Else
    Image1.Visible = False
End If
End Sub

Private Sub ComboBox2_Change()
If ComboBox2.Value = 2 Then
    ComboBox3.Visible = True
Else
    ComboBox3.Visible = False
End If
If ComboBox3.Visible = True Then
    If TextBox1 <> "" And TextBox2 <> "" And ComboBox1 <> "" And ComboBox2 <> "" And ComboBox3 <> "" Then
        Image1.Visible = True
    Else
        Image1.Visible = False
    End If
ElseIf TextBox1 <> "" And TextBox2 <> "" And ComboBox1 <> "" And ComboBox2 <> "" Then
    Image1.Visible = True
Else
    Image1.Visible = False
End If
End Sub

Private Sub ComboBox3_Change()
If ComboBox3.Visible = True Then
    If TextBox1 <> "" And TextBox2 <> "" And ComboBox1 <> "" And ComboBox2 <> "" And ComboBox3 <> "" Then
        Image1.Visible = True
    Else
        Image1.Visible = False
    End If
ElseIf TextBox1 <> "" And TextBox2 <> "" And ComboBox1 <> "" And ComboBox2 <> "" Then
    Image1.Visible = True
Else
    Image1.Visible = False
End If
End Sub

Private Sub TextBox1_Change()
If ComboBox3.Visible = True Then
    If TextBox1 <> "" And TextBox2 <> "" And ComboBox1 <> "" And ComboBox2 <> "" And ComboBox3 <> "" Then
        Image1.Visible = True
    Else
        Image1.Visible = False
    End If
ElseIf TextBox1 <> "" And TextBox2 <> "" And ComboBox1 <> "" And ComboBox2 <> "" Then
    Image1.Visible = True
Else
    Image1.Visible = False
End If
End Sub

Private Sub TextBox2_Change()
If ComboBox3.Visible = True Then
    If TextBox1 <> "" And TextBox2 <> "" And ComboBox1 <> "" And ComboBox2 <> "" And ComboBox3 <> "" Then
        Image1.Visible = True
    Else
        Image1.Visible = False
    End If
ElseIf TextBox1 <> "" And TextBox2 <> "" And ComboBox1 <> "" And ComboBox2 <> "" Then
    Image1.Visible = True
Else
    Image1.Visible = False
End If
End Sub

Kesinlikle çözüm budur.
Teşekkürler Yusuf44
 
Üst