OverFlowException was unhandled by user code
Jeg bruger denne function som er fundet på nettet.Men får fejlen:
*OverFlowException was unhandled by user code*
Tips:
Make sure you are not dividing by zero.
Function CountWord(ByVal inputString)
Dim pos, spaceCount
pos = 1
spaceCount = 1
While Not pos = Len(inputString)
If Mid(inputString, pos, 1) = " " Then <--------- LINIEN HER ---------
If Not pos = 1 Then
If Not Mid(inputString, pos - 1, 1) = " " Then
spaceCount = spaceCount + 1
End If
End If
End If
pos = pos + 1
End While
CountWord = spaceCount
End Function
Håber nogen kan hjælpe mig videre.....