xlsvbah19.1

VERSION 5.00
Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} frm1Oefeningen 
   Caption         =   "UserForm1"
   ClientHeight    =   4380
   ClientLeft      =   120
   ClientTop       =   465
   ClientWidth     =   7305
   OleObjectBlob   =   "frm1Oefeningen.frx":0000
   StartUpPosition =   1  'CenterOwner
End
Attribute VB_Name = "frm1Oefeningen"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Option Explicit

Private Sub UserForm_Initialize()

'   Oefening 1

    Me.Caption = ThisWorkbook.Name

    With lstContacten
        .ColumnCount = 2
        .AddItem
        .List(0, 0) = "Floris"
        .List(0, 1) = "Bakker"
        .AddItem
        .List(1, 0) = "Kees"
        .List(1, 1) = "de Vries"
    End With

End Sub

Private Sub cmdToevoegen_Click()

'   Oefening 2
   
    txtVoornaam.SetFocus
    
End Sub

Private Sub cmdOpslaan_Click()

'   Oefening 2

    With lstContacten
        .AddItem
        .List(.ListCount - 1, 0) = txtVoornaam.Text
        .List(.ListCount - 1, 1) = txtAchternaam.Text
    End With

End Sub

Private Sub cmdVerwijderen_Click()

'   Oefening 3

    lstContacten.RemoveItem (lstContacten.ListIndex)

End Sub

Private Sub cmdCancel_Click()

'   Oefening 3

    Unload Me

End Sub

Download hier het bestand.