• DİKKAT

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

userform veri girişi

Katılım
10 Nisan 2014
Mesajlar
113
Excel Vers. ve Dili
2013 ingilizce
Arkadaşlar merhaba,

Excel çalışma kitabında hücrelere değerleri userform üzerinden giriyorum. Ancak userform da fatura tutarını girdiğimde ve kaydettiğimde excel hücresine text olarak yazıyor bu sebepten excel sayfasındaki alt toplama da bu hücredeki veriyi toplamıyor. Ancak hücreye gidip convert to number dediğim zaman toplama dahil ediyor. Textbox verisinin sayı olarak hücreye yazılmasını nasıl sağlarım?

Teşekkürler
 
Bir kısım kod aşağıdaki şekilde Burada textbox7 fatura girişinin yapıldığı yer. Kırmızı ile yazılı olan kod'da formatı sayı olarak yaz diye nasıl ayarlayabilirim?

Private Sub CommandButton1_Click()
If TextBox7.Value <> "" And TextBox2.Value <> "" And TextBox3 <> "" And TextBox4 <> "" And TextBox5 <> "" And TextBox6 <> "" And TextBox8 <> "" Then


Set s1 = Sheets("CH1-1 transfer")
Set s2 = Sheets("Ödemeler 2016")


b = ActiveCell.Row



s1.Cells(b, "C").Value = TextBox2.Value
s1.Cells(b, "F").Value = TextBox4.Value
s1.Cells(b, "H").Value = ComboBox3.Value
s1.Cells(b, "L").Value = TextBox7.Value
s1.Cells(b, "M").Value = TextBox8.Value
s1.Cells(b, "D").Value = "A+"
If s1.Cells(b, "k").Value - TextBox7.Value >= 0 And s1.Cells(b, "k").Value <> "" Then
s1.Cells(b, "k").Value = s1.Cells(b, "k").Value - TextBox7.Value
Else
s1.Cells(b, "k").Value = ""
End If





k = s2.Range("J65536").End(xlUp).Row
X = s2.Range("J65536").End(xlUp).Row + 1
'y = s2.Cells(k, 1).Value
s2.Cells(X, 1).Value = X + 1




s2.Cells(X, "B").Value = ComboBox2.Value
s2.Cells(X, "C").Value = ComboBox1.Value
s2.Cells(X, "D").Value = TextBox3.Value
s2.Cells(X, "E").Value = TextBox2.Value
s2.Cells(X, "F").Value = TextBox5.Value
s2.Cells(X, "G").Value = TextBox4.Value
s2.Cells(X, "H").Value = ComboBox3.Value
s2.Cells(X, "L").Value = TextBox7.Value
s2.Cells(X, "J").Value = TextBox8.Value
s2.Cells(X, "K").Value = TextBox6.Value





If MsgBox("ÖDEME TALEP FORMU OLUSTURMAK iSTERMiSiNiZ ?", vbYesNo, "UYARI!") = vbNo Then

If CloseMode = 0 Then
Cancel = True
End If
Unload UserForm1
Else

Application.ScreenUpdating = False
yol = ThisWorkbook.Path & "\" & "Ödeme Talebi.xlsx"
Workbooks.Open (yol)
Sheets("Sheet 1").Select

Cells(14, "f") = TextBox3
Cells(14, "h") = TextBox2
Cells(12, "f") = TextBox4
Cells(15, "h") = TextBox8
Cells(20, "f") = TextBox5
Cells(23, "c") = TextBox7 * 1.18
Cells(15, "b") = ComboBox3


Application.ScreenUpdating = True
MsgBox "KAYIT TAMAMLANDI ÖDEME FORMU OLUSTURULDU", , "BiLGi"

If CloseMode = 0 Then
Cancel = True
End If
Unload UserForm1

End If


Else

MsgBox "BOS ALANLAR VAR !!", , "BiLGi"


End If
 
Son düzenleme:
Arkadaşlar sorun çözülmedi Yardımcı olabilecek bir arkadaş var mı?
 
Son düzenleme:
Buyurun.:cool:
Kod:
s1.Cells(b, "L").Value = [B][COLOR="Red"]cdbl([/COLOR][/B]TextBox7.Value[B][COLOR="red"])[/COLOR][/B]
 
Geri
Üst