isnoend2001
asked on
problem wit Instr function
If InStr(lbl1,lblCredit, "$") = True Then this does not work
but this does; If InStr(1, lblCredit, "$") Then
why?
but this does; If InStr(1, lblCredit, "$") Then
why?
In any case InStr returns a position and since True is equal to -1, True will never be equal to the position.
ASKER
Whoops i meant
InStr(1,lblCredit, "$") = True does not work
this does
If InStr(1, lblCredit, "$") Then
using the = True causes it not to work
InStr(1,lblCredit, "$") = True does not work
this does
If InStr(1, lblCredit, "$") Then
using the = True causes it not to work
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks, learn something new everyday
You're welcome and I'm glad I was able to help.
In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2014
In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2014
InStr(lbl1,lblCredit, "$") = True
or did you mean
InStr(1,lblCredit, "$") = True