- Katılım
- 5 Eylül 2007
- Mesajlar
- 1,247
- Excel Vers. ve Dili
- ofis 2010
Kod:
Dim ara As String
ara = ComboBox1.Value
getir = Application.WorksheetFunction.VLookup(ara, Sheets("UNVANLAR").Range("A2:B65536"), 2, False)
TextBox4.Value = getir
End Sub
Private Sub CommandButton1_Click()
Sheets("KdvListe").Select
Sheets("KdvListe").Range("C65536").End(xlUp).Offset(1) = TextBox1.Text 'Tarih
Sheets("KdvListe").Range("D65536").End(xlUp).Offset(1) = TextBox2.Text 'Seri
Sheets("KdvListe").Range("E65536").End(xlUp).Offset(1) = Val(TextBox3.Text) 'Sıra No
Sheets("KdvListe").Range("F65536").End(xlUp).Offset(1) = ComboBox1.Text 'Satıcı Ünvan
Sheets("KdvListe").Range("G65536").End(xlUp).Offset(1) = TextBox4.Text 'Vergi/TC
Sheets("KdvListe").Range("H65536").End(xlUp).Offset(1) = ComboBox2.Text 'Hizmet
Sheets("KdvListe").Range("I65536").End(xlUp).Offset(1) = TextBox5.Text 'Hizmet Miktar
Sheets("KdvListe").Range("J65536").End(xlUp).Offset(1) = TextBox6.Text 'Hizmet KDV Hariç Matrah
Sheets("KdvListe").Range("K65536").End(xlUp).Offset(1) = TextBox7.Text 'KDV
If TextBox8.Text = "" Then TextBox8.Text = "-"
Sheets("KdvListe").Range("L65536").End(xlUp).Offset(1) = TextBox8.Text 'GGB Tescil No
Sheets("KdvListe").Range("M65536").End(xlUp).Offset(1) = TextBox9.Text 'İndirim KDV Dönem
MsgBox "Veri Girişi Yapıldı.", vbOKOnly
TextBox1.SetFocus ' İmlecin hangi Textbox' a geleceni belirtir.Kodun sonuna yazılır.
TextBox1.SelStart = 0 ' imlecin ilgili hücrenin başına gelmesini sağlar.
TextBox2 = Empty 'kayıttan sonra silinecek Textbox' u gösteriyor.
TextBox3 = Empty
TextBox5 = Empty
TextBox6 = Empty
TextBox7 = Empty
End Sub
Private Sub CommandButton2_Click()
Unload Me
End Sub
Private Sub CommandButton3_Click()
Range("$I$151") = "TOPLAM"
Range("$J$151") = WorksheetFunction.Sum(Sheets("KdvListe").Range("J5:J150"))
Range("$K$151") = WorksheetFunction.Sum(Sheets("KdvListe").Range("K5:K150"))
End Sub
Private Sub TextBox1_Change()
With TextBox1
.SelLength = 1
If .SelText = "." Then
.SelStart = .SelStart + 1
.SelLength = 1
End If
End With
End Sub
Private Sub UserForm_Initialize()
With TextBox1
.MaxLength = 10
.EnterFieldBehavior = fmEnterFieldBehaviorRecallSelection
.Text = "##.##.####"
.SelStart = 0
.SelLength = 1
End With
ComboBox1.RowSource = "UNVANLAR!A2:A" & Sheets("UNVANLAR").Cells(65536, "A").End(xlUp).Row
ComboBox2.RowSource = "HIZMET!A2:A" & Sheets("HIZMET").Cells(65536, "A").End(xlUp).Row
End Sub
iyi akşamlar, kullandığım formda iki aksama oluyor, kayıttan sonra imleç tarih textbox' un sonuna geliyor, Tarih yazar iken otomatik noktalı yazmasını sağlanabilir mi? Teşekkür ederim.
Son düzenleme:
