Attribute VB_Name = "mod1Oefeningen"
Sub Oefening1()
Range("A4").Value = WorksheetFunction.Sum(Range("A1:A3"))
End Sub
Sub Oefening2()
Dim strNaam As String
Dim strVoornaam As String
Dim intPositieSpatie As Integer
strNaam = "Floris Honingbloem"
intPositieSpatie = InStr(1, strNaam, " ")
strVoornaam = Left(strNaam, intPositieSpatie - 1)
MsgBox strVoornaam
End Sub
Sub Oefening3()
Dim dtStart
Dim dtEind
dtStart = InputBox("Geef de startdatum op")
dtEind = InputBox("Geef de einddatum op")
If IsDate(dtStart) And IsDate(dtStart) Then
MsgBox DateDiff("d", dtStart, dtEind)
End If
End Sub
Download hier het bestand.
