• DİKKAT

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

Textbox'lardan 1 tanesi bile boş ise işleme devam etmesin

serif_007

Altın Üye
Katılım
5 Nisan 2014
Mesajlar
155
Excel Vers. ve Dili
Excel 2019
Merhabalar;

6 adet textbox'ım var. Bu textboxlardan 1 tanesi bile boş olması durumunda işleme devam etmesin istiyorum.

Kod:
If TextBox1.Value = "" Then
MsgBox " TextBox1 boş geçildi!"
Exit Sub
End If
If TextBox2.Value = "" Then
MsgBox "TextBox2 boş geçildi!"
Exit Sub
End If
If TextBox3.Value = "" Then
MsgBox " TextBox3 boş geçildi!"
Exit Sub
End If
If TextBox4.Value = "" Then
MsgBox " TextBox4 boş geçildi!"
Exit Sub
End If
If TextBox5.Value = "" Then
MsgBox " TextBox5 boş geçildi!"
Exit Sub
End If
If TextBox6.Value = "" Then
MsgBox " TextBox6 boş geçildi!"
Exit Sub
End If

bunu denedim fakat sonuç alamadım
 
Merhabalar;

6 adet textbox'ım var. Bu textboxlardan 1 tanesi bile boş olması durumunda işleme devam etmesin istiyorum.

Kod:
If TextBox1.Value = "" Then
MsgBox " TextBox1 boş geçildi!"
Exit Sub
End If
If TextBox2.Value = "" Then
MsgBox "TextBox2 boş geçildi!"
Exit Sub
End If
If TextBox3.Value = "" Then
MsgBox " TextBox3 boş geçildi!"
Exit Sub
End If
If TextBox4.Value = "" Then
MsgBox " TextBox4 boş geçildi!"
Exit Sub
End If
If TextBox5.Value = "" Then
MsgBox " TextBox5 boş geçildi!"
Exit Sub
End If
If TextBox6.Value = "" Then
MsgBox " TextBox6 boş geçildi!"
Exit Sub
End If

bunu denedim fakat sonuç alamadım

bunlar boş geçtiğinizde mesaj kutusu çıkarır.

If TextBox1.Text = "" Then
mesaj = MsgBox("TextBox6 boş geçildi!", vbOKOnly + vbExclamation, "UYARI!")
TextBox1.SetFocus
Exit Sub
 
C++:
Dim TextDolu() As Variant
    Dim i As Integer
    Dim isEmpty As Boolean
    
 
    TextDolu = Array(TextBox1, TextBox2, TextBox3, TextBox4, TextBox5)
    
 
    For i = LBound(TextDolu) To UBound(TextDolu)
        If TextDolu(i).Text = "" Then
            isEmpty = True
            Exit For
        End If
    Next i
    
 
    If isEmpty Then
        MsgBox "Lütfen tüm text boxları doldurun!", vbExclamation, "Uyarı"
    Else
        ' textboxlar dolu ise işlemlerini burada devam ettirmeniz gerekiyor....
    End If
Kodları kullanarak deneyin,,
 
kodun yerinde değişiklik yaparak sorunu çözdüm. kendi hatam teşekkür ederim
 
kodun yerinde değişiklik yaparak sorunu çözdüm. kendi hatam teşekkür ederim

Merhaba.
Nasıl çözdüğünüzü de açıklarsanız, bilginizi kendinize saklamamış olursunuz.
 
Geri
Üst