Hmn, VB6 doesn't have the .toLower method. It uses an lcase(variablename or string) function...... try switching
Pos = InStr((Word(i).ToLower), Wrd.ToLower)
to
Pos = InStr(lcase(Word(i)), lcase(Wrd))
and see how that feels....
Comatose
Taboo Programmer
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
try casting it to a string..... I am trying to help you with code fragments.... I don't know how the program works together in it's entirety, but try this:
Label1.Caption = Label1.Caption & CheckWord(cstr(Result.PhraseInfo.GetText))
Comatose
Taboo Programmer
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
Hmn, I don't have the object for voice recognition that you have...
Comatose
Taboo Programmer
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
SpInProcRecoContext, is it a third party download?
Comatose
Taboo Programmer
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
Can you point out the line that is causing the error?
Comatose
Taboo Programmer
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
try breaking that up into variables.... like
thetext = CStr(Result.PhraseInfo.GetText)
and then call checkword(thetext), and see if that helps... also, try msgboxing result.phraseinfo.gettext, beyond that.... what is phraseinfo?
EDIT: n/m I see that phraseinfo is a part of the object for the speechlib.... try msgboxing it, and see if it returns the proper values....
Comatose
Taboo Programmer
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215