Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21314

Getting the value of the last characters from a string

$
0
0
I have the following string:

Example 1
s = "Pole(1).CellNumber(1)=0"

In the above example I would simply use the Val() function for the Right() of variable s for a length of 1

Value = Val(Right(s, 1))

However, the string will not always have single digit values. Here's another one

Example 2
s = "Pole(13).CellNumber(4)=123"

Now my question is how do I get the value of "123" from Example 2 and using the same code get the value from Example 1

Viewing all articles
Browse latest Browse all 21314

Trending Articles