sirjulio
asked on
conditional operator syntax
I have string that contains information i want after the sixth comma, but the code i've written here won't return true for the if statement and goes into an infinite loop. Is the conditional operator syntax inaccurate?
intCommaCount = 0
x = 0
Do While intCommaCount < 6
letter = Mid(stgFileToAppend, x, 0)
If letter = "," Then
intCommaCount = intCommaCount + 1
x = x + 1
Else
x = x + 1
End If
Loop
intCommaCount = 0
x = 0
Do While intCommaCount < 6
letter = Mid(stgFileToAppend, x, 0)
If letter = "," Then
intCommaCount = intCommaCount + 1
x = x + 1
Else
x = x + 1
End If
Loop
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanx rajesh
i overlooked that if i wanted the character to enter the string variable that the mid method's third variable (string length) has to be 1
u rock
i overlooked that if i wanted the character to enter the string variable that the mid method's third variable (string length) has to be 1
u rock
thanks for the grade :)
str1 = "hello, how, do, you, do, my, dear"
s = Split(str1, ",")
MsgBox s(6)
here s(6) gives you the string after the sixth comma
Cheers!
Rajesh