Trap Type-Mismatch Error - Resolved
Guys,
I am having a problem trapping an error and VB error handling is not helping me out at all.
I have the computer connected to a device located on the comm port. It is sending information back to the computer. Occasionally, the device sending data sends back garbage and the vb program crashes.
I have a sub that is basically like so
VB Code:
On Error Goto errHandler
Select Case Message
Case 'blah'
Case 'blah blah'
End Select
Exit Sub
errHandler:
end sub
It all works fine until I get an extra charicter or a bit flips over the commport. I have a line in the Case statement that looks for certain values and then converts them to normal numbers so a person can read them
so I have this
VB Code:
IsNumeric(CInt("&H" & tempCommand))
If tempCommand comes in like "1E" then all is good
If it comes in like "1R", I get a type mismatch error.
Why wont this go to the errHandler?
Jerel