SpriN Toch
SpriN Toch

Reputation: 13

user-defined type not defined in vb6 While I didn't make any new type

Function mot(ch As String, c As Char, i As Integer) As Integer Dim j As Integer Dim a As Integer Dim k As Integer j = InStr(ch, 1, c) If j = -1 Then mot = j ElseIf j = i Then mot = 0 Else For k = j To Len(ch) - 1 If Mid(ch, k, 1) = c Then a = a + 1 End If Next mot = a End If End Function

Highligh: First line (function mot ...) Error: user-defined type not defined

Upvotes: 0

Views: 98

Answers (1)

Thomas Krojer
Thomas Krojer

Reputation: 1018

Are you shure, you are talking about VB6? I don´t remember a datatype "CHAR" in VB6. Try string type.

Upvotes: 4

Related Questions