I think you problem is in the 1 you put at the end, Try this...
Dim Ti As Variant
Dim C As Integer
Ti = ActiveCell.Value()
C = Instr(1, CStr(Ti), ":")
MsgBox (C)
The 1 at the end is telling it to only go for 1 char then stop, if you leave it blank it will look at the whole string...
It might be that rectemp2!YAPAST is a NULL value, to get around this just add & "" to the end of your line .
i.e. Select Case rectemp2!YAPAST & ""
try that
Matt
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.