10-30-2009, 10:14 AM
hi faqtest2009,
I have modified your code, check out if this works
I have verified with the data in your attachment.
let me know if you find any issue with other data.
@Everyone - Please use proper tags to wrap your code and make your post readable.
I have modified your code, check out if this works
Code:
Function ParseScreenVal(varString,varCurr,varNext)
i = varString
i = CStr(i)
varCount = instr( 1,i,varCurr,vbTextCompare)
varCount2 = instr( 1,i,varNext,vbTextCompare)
'ParseScreenVal = Mid(i, varCount + len(varCurr),varCount2-varCount - len(varCurr))
sResult = Mid(i, varCount + len(varCurr),varCount2-varCount - len(varCurr))
Do
varCount = instr( 1,sResult,varCurr,vbTextCompare)
If varCount > 0Then
sResult = Mid(sResult, varCount + len(varCurr),len(sResult))
End If
Loop while varCount > 0
ParseScreenVal = sResult
End Function
let me know if you find any issue with other data.
@Everyone - Please use proper tags to wrap your code and make your post readable.