D
DaBartman
I am quite puzzled by the error I when this function gets called:
Runtime error "13"
Type mismatch
The error is triggered by the InStr function
Public Function IsNoLimit(gn As String) As Boolean
Dim gnp As String
If InStr(gn, "No Limit", vbTextCompare) > 0 Then <<< offending line of
code
IsNoLimit = True
Else
IsNoLimit = False
End If
End Function
All I want it to do is tell me if the string "No Limit" was found; InStr >0
as in gn = " 5/10 No Limit Holdem" where InStr would be 6 or "Omaha8: Limit
6/12" where InStr should be 0 as "No Limit" was not found within the search
string gn.
The help files tell me that the return data type of the InStr function is
Varient (Long). I have tried using a variable to return the InStr function to
(such as gnnl) and dimmsioning the variable to Varient and Long. The error
has always been the same which is why you see the current code attempt above.
Same error.
Anyone out there have any ideas as to why I get this error and any solutions
to it?
Much thanks for reading this somewhat lengthly post,
Bart
Runtime error "13"
Type mismatch
The error is triggered by the InStr function
Public Function IsNoLimit(gn As String) As Boolean
Dim gnp As String
If InStr(gn, "No Limit", vbTextCompare) > 0 Then <<< offending line of
code
IsNoLimit = True
Else
IsNoLimit = False
End If
End Function
All I want it to do is tell me if the string "No Limit" was found; InStr >0
as in gn = " 5/10 No Limit Holdem" where InStr would be 6 or "Omaha8: Limit
6/12" where InStr should be 0 as "No Limit" was not found within the search
string gn.
The help files tell me that the return data type of the InStr function is
Varient (Long). I have tried using a variable to return the InStr function to
(such as gnnl) and dimmsioning the variable to Varient and Long. The error
has always been the same which is why you see the current code attempt above.
Same error.
Anyone out there have any ideas as to why I get this error and any solutions
to it?
Much thanks for reading this somewhat lengthly post,
Bart