type mismatch fejl i lektiebog program
hey... har følgende kode:---
Private Sub cmdAdd_Click()
For iCnt = 0 To 9
If Not (strLektia(iCnt) = "") Then GoTo nexti
If (strLektia(iCnt) = "") Then
strLektia(iCnt) = InputBox("Hvat hevur tú fyri?", "Lektia")
End If
nexti:
If Not (strTime(iCnt) = "") Then GoTo nextiC
If (strTime(iCnt) = "") Then
strTime(iCnt) = InputBox("Hvat kl. skalt tú minnast á tað? Format: HH:MM:SS (einki skriva, hvis tú ikki skalt minnast á tað", "Klokkan")
End If
nextiC:
Next iCnt
If Not (strLektia = "") And Not (strTime = "") Then
List1.AddItem strLektia & Space(50) & strTime
List1.AddItem "---"
ElseIf Not (strLektia = "") And (strTime = "") Then
List1.AddItem strLektia
List1.AddItem "---"
End If
End Sub
---
det er meningen at for hver gang man trykker på knappen, skal der komme en boks frem, som indsætter lektier og alarm i en listboks... men der kommer en fejl: type mismatch, og peger på linien:
Private Sub cmdAdd_Click()
---
nogen idé om hvad jeg har gjort galt?
