Link to home
Start Free TrialLog in
Avatar of pallilu
pallilu

asked on

Truncate or instring function for cutting the value and taking only part of value from my form value

Hi Experts,
I have values comming from my form as Station 1, station 2, Station 3, Station 4, Station 5, Upto 13 As strings. I need to get only last part of station. Ie station Number, 1, 2,3,4,5,6,7,8,9,10 etc..

For example = Value = 13

Which Function should I use it.Is it instring ot truncate
Please advice

Palilu
Avatar of indu_mk
indu_mk

Dim str As String
str = "Station 13"
Dim i As Integer
i = str.LastIndexOf(" ")
Value = str.Substring(i)
Avatar of pallilu

ASKER

Indu
Thanks for your response
I am getting space and number For example - value = 11

How to get rid of space

I have form value always Station 1, Station 2 Always Station name space and Number.

Please advice
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial