• DİKKAT

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

texbox3 de verı yoksa texbox1 ı kaydetme

Katılım
26 Ocak 2010
Mesajlar
190
Excel Vers. ve Dili
2010 turkçe
userformda texbox ve combobox ları satırlara kaydettırıyoruz
burda
mesela
texbox3 de verı yoksa texbox1 ı kaydetme bu şekılde koşul belırleyebılırmıyız
 
If TextBox1.Value = "" and TextBox3.Value = "" Then
MsgBox (" giriniz..."), vbCritical = vbOKOnly, "Uyarı"
Me.TextBox1.SetFocus
Beep
Exit Sub
end if
 
hocam sadece tekboxsu kaydetmıcel o sekılde bı kosul degılmı bu
 
Private Sub CommandButton1_Click()
Sheets("ALIŞ").Select
son = Cells(65536, "E").End(xlUp).Row + 1
Cells(son, "C") = CDbl(CDate(TextBox1))
Cells(son, "D") = TextBox2
Cells(son, "E") = TextBox3
Cells(son, "F") = ("ALIŞ")
Cells(son, "G") = ComboBox1
Cells(son, "H") = ComboBox3
Cells(son, "I") = CDbl(TextBox5.Value)
Cells(son, "J") = CDbl(TextBox6.Value)
Cells(son, "K") = TextBox8
Sheets("ALIŞ").Select
son = Cells(65536, "E").End(xlUp).Row + 1
Cells(son, "G") = ComboBox1
Cells(son, "H") = ComboBox4
Cells(son, "I") = CDbl(TextBox13.Value)
Cells(son, "J") = CDbl(TextBox14.Value)
Cells(son, "K") = TextBox16
 
Bırıncı alış tamam ıkıncı alısda
combobox4 de verı varsa combobok1 kaydetsın
yoksa etmesın ıstıyorum
bu sekılde nasıl yapabılırım
 
koşullu biçimlendirmeyi seç formul ekleye gel aşağıdaki formili yaz rezgi seç. kolay gelsin
=EĞER(ETARİHLİ(BUGÜN();H1;"D")<=10;1;0)
 
Hocam bısı anlamadım valla özur dılerım
userform uzerınden bahsedıyoruz degılmı
 
Acaba bı yolu varmı
nasıl eklıcem konusunda yardımcı olurmusunuz
 
userformda texbox ve combobox ları satırlara kaydettırıyoruz
burda
mesela
texbox3 de verı yoksa texbox1 ı kaydetme bu şekılde koşul belırleyebılırmıyız

Keşke bir örnek dosya olsaydı deneme şansımız olurdu. Aşağıdaki gibi bir deneyiniz.
Sheets("ALIŞ").Select
son = Cells(65536, "E").End(xlUp).Row + 1
If .Cells(son, "C") = TextBox3 > "" Then
Cells(son, "C") = CDbl(CDate(TextBox1))
Else
Cells(son, "E") = TextBox3
End If
Cells(son, "D") = TextBox2
Cells(son, "F") = ("ALIŞ")
Cells(son, "G") = ComboBox1
Cells(son, "H") = ComboBox3
Cells(son, "I") = CDbl(TextBox5.Value)
Cells(son, "J") = CDbl(TextBox6.Value)
Cells(son, "K") = TextBox8
Sheets("ALIŞ").Select
son = Cells(65536, "E").End(xlUp).Row + 1
Cells(son, "G") = ComboBox1
Cells(son, "H") = ComboBox4
Cells(son, "I") = CDbl(TextBox13.Value)
Cells(son, "J") = CDbl(TextBox14.Value)
Cells(son, "K") = TextBox16
 
Merhaba,

Veri olmayan bir dosya eklemişsiniz ve ne yapılması gerektiğini yazmamışsınız.

Eklediğiniz dosyaya 5-6 satır veri ekleyip yapmak istediğinizi detaylı açıklayıp tekrar dosyanızı eklermisiniz.
 
TextBox3 de veri yoksa TextBox1 i kaydetme. Bu sorununuz için kodun ilgili kısmını aşağıdaki gibi değiştirin.

Private Sub CommandButton1_Click()
Sheets("ALIŞ").Select
son = Cells(65536, "H").End(xlUp).Row + 1
If TextBox3.Value = "" Then
Cells(son, "C") = ""
Else
Cells(son, "C") = CDbl(CDate(TextBox1))
End If
Cells(son, "D") = TextBox2

Kolay Gelsin
 
Private Sub CommandButton1_Click()
Sheets("ALIŞ").Select
son = Cells(65536, "H").End(xlUp).Row + 1
Cells(son, "C") = CDbl(CDate(TextBox1))
Cells(son, "D") = TextBox2
Cells(son, "E") = TextBox3
Cells(son, "F") = ("ALIŞ")
Cells(son, "G") = ComboBox1
Cells(son, "H") = ComboBox3
Cells(son, "I") = CDbl(TextBox5.Value)
Cells(son, "J") = CDbl(TextBox6.Value)
Cells(son, "K") = TextBox8
Sheets("ALIŞ").Select
son = Cells(65536, "H").End(xlUp).Row + 1
If ComboBox4.Value = "" Then
Cells(son, "H") = ""
Else
Cells(son, "G") = ComboBox1
End If
Cells(son, "H") = ComboBox4
ElseIf TextBox12.Value = "" Then
Cells(son, "I") = ""
Else
Cells(son, "G") = ComboBox1
End If
Cells(son, "I") = CDbl(TextBox12.Value)
If TextBox13.Value = "" Then
Cells(son, "J") = ""
Else
Cells(son, "G") = ComboBox1
End If
Cells(son, "J") = CDbl(TextBox13.Value)
 
Osman bey,

İstediğinize geçmeden önce, neden alt alta bukadar aynı kodu kullandınız anlamadım.

Buradaki asıl amaçınız nedir. Neden G:K arasını defalarca yazdırdınız.

Sheets("ALIŞ").Select
son = Cells(65536, "H").End(xlUp).Row + 1
Cells(son, "C") = CDbl(CDate(TextBox1))
Cells(son, "D") = TextBox2
Cells(son, "E") = TextBox3
Cells(son, "F") = ("ALIŞ")
Cells(son, "G") = ComboBox1
Cells(son, "H") = ComboBox3
Cells(son, "I") = CDbl(TextBox5.Value)
Cells(son, "J") = CDbl(TextBox6.Value)
Cells(son, "K") = TextBox8
Sheets("ALIŞ").Select
son = Cells(65536, "H").End(xlUp).Row + 1
Cells(son, "G") = ComboBox1
Cells(son, "H") = ComboBox4
Cells(son, "I") = CDbl(TextBox12.Value)
Cells(son, "J") = CDbl(TextBox13.Value)
Cells(son, "K") = TextBox15
Sheets("ALIŞ").Select
son = Cells(65536, "H").End(xlUp).Row + 1
Cells(son, "G") = ComboBox1
Cells(son, "H") = ComboBox5
Cells(son, "I") = CDbl(TextBox20.Value)
Cells(son, "J") = CDbl(TextBox21.Value)
Cells(son, "K") = TextBox23
Sheets("ALIŞ").Select
son = Cells(65536, "H").End(xlUp).Row + 1
Cells(son, "G") = ComboBox1
Cells(son, "H") = ComboBox6
Cells(son, "I") = CDbl(TextBox27.Value)
Cells(son, "J") = CDbl(TextBox28.Value)
Cells(son, "K") = TextBox30
Sheets("ALIŞ").Select
son = Cells(65536, "H").End(xlUp).Row + 1
Cells(son, "G") = ComboBox1
Cells(son, "H") = ComboBox7
Cells(son, "I") = CDbl(TextBox33.Value)
Cells(son, "J") = CDbl(TextBox35.Value)
Cells(son, "K") = TextBox37
Sheets("ALIŞ").Select
son = Cells(65536, "H").End(xlUp).Row + 1
Cells(son, "G") = ComboBox1
Cells(son, "H") = ComboBox8
Cells(son, "I") = CDbl(TextBox41.Value)
Cells(son, "J") = CDbl(TextBox42.Value)
Cells(son, "K") = TextBox44

.
 
Hocam dedım ya
bı kamyonu bı defada işleyebılmek ıcım
bazen 6 ,7 kalem malzeme oluyo bı kamyonda
ondan tektek zor oluyodabı defada
hepsını ısleyebılmek ıcın
 
Geri
Üst