Dim Yeni_mi As Boolean
Dim TbLen2 As Long
[COLOR=#ff0000]Dim sv[/COLOR]
Private Sub CommandButton1_Click()
Dim Son_Dolu_Satir, Bos_Satir As Long
Son_Dolu_Satir = Sheets("Klantenlijst").Range("A600").End(xlUp).Row
Bos_Satir = Son_Dolu_Satir + 1
Sheets("Klantenlijst").Range("B" & Bos_Satir).Value = _
Application.WorksheetFunction.Max(Sheets("Klantenlijst").Range("B:B")) + 1
Sheets("Klantenlijst").Range("B" & Bos_Satir).Value = TextBox20.Text 'Klant-ID
Sheets("Klantenlijst").Range("C" & Bos_Satir).Value = TextBox23.Text 'Titel
Sheets("Klantenlijst").Range("D" & Bos_Satir).Value = TextBox14.Text 'Voornaam
Sheets("Klantenlijst").Range("E" & Bos_Satir).Value = TextBox15.Text 'Achternaam
Sheets("Klantenlijst").Range("F" & Bos_Satir).Value = TextBox16.Text 'Adres
Sheets("Klantenlijst").Range("G" & Bos_Satir).Value = TextBox17.Text 'Postcode
Sheets("Klantenlijst").Range("H" & Bos_Satir).Value = TextBox21.Text 'Woonplaats
Sheets("Klantenlijst").Range("I" & Bos_Satir).Value = TextBox18.Text 'Land
Sheets("Klantenlijst").Range("K" & Bos_Satir).Value = TextBox19.Text 'Email
Sheets("Klantenlijst").Range("P" & Bos_Satir).Value = TextBox25.Text '2016
Sheets("Klantenlijst").Range("O" & Bos_Satir).Value = TextBox26.Text '2017
Sheets("Klantenlijst").Range("N" & Bos_Satir).Value = TextBox27.Text '2018
Sheets("Klantenlijst").Range("M" & Bos_Satir).Value = TextBox28.Text '2019
Sheets("Klantenlijst").Range("L" & Bos_Satir).Value = TextBox29.Text '2020
Sheets("Klantenlijst").Range("Q" & Bos_Satir).Value = TextBox24.Text 'Aankoopbedrag
Sheets("Klantenlijst").Select
ListBox3.Clear
Refresh
Label35.Caption = ListBox3.ListCount
End Sub
Private Sub Listbox3_Click() 'Aangepast door HSV
Dim Bulunan_Satir_No As Long
With ListBox3
Bulunan_Satir_No = .ListIndex + 1
TextBox14.Text = .Column(3) 'Voornaam
TextBox15.Text = .Column(4) 'Achternaam
TextBox16.Text = .Column(5) 'Adres
TextBox21.Text = .Column(7) 'Woonplaats
TextBox18.Text = .Column(8) 'Land
TextBox19.Text = .Column(10) 'Email
TextBox25.Text = .Column(15) '2016
TextBox26.Text = .Column(14) '2017
TextBox27.Text = .Column(13) '2018
TextBox28.Text = .Column(12) '2019
TextBox29.Text = .Column(11) '2020
TextBox24.Text = .Column(16) 'Aankoopbedrag
End With
Dim mycontrol As Object
For Each mycontrol In Klantenlijst.Controls
If TypeName(mycontrol) = "TextBox" Then
If IsNumeric(mycontrol.Value) Then
mycontrol.Value = Format(mycontrol.Value, "€ #,##0.00")
End If
End If
Next mycontrol
TextBox17.Text = Sheets("Klantenlijst").Range("G" & Bulunan_Satir_No).Value 'Postcode
TextBox20.Text = Sheets("Klantenlijst").Range("B" & Bulunan_Satir_No).Value 'Klant-ID
TextBox23.Text = Sheets("Klantenlijst").Range("C" & Bulunan_Satir_No).Value 'Titel
End Sub