Posts: 4
Threads: 2
Joined: Jul 2009
Reputation:
0
07-08-2009, 01:51 AM
Hi All
I need to get the text from a link using the ""getroproperty"". But the value returned is- e.g. ""Your work item is 50% ready"". The value i need from the string is the 50%. How do i get this value from the string returned please.
Thanks
Posts: 50
Threads: 0
Joined: Jul 2009
Reputation:
0
07-08-2009, 09:43 AM
String1 = "Your work item is 50% ready"
String2 = Split(String1,"is")
String3 = Split(String2(1),"ready")
msgbox String3(0)
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
07-08-2009, 11:58 AM
Do you want to verify if 50% is present in the string or you need to retrieve it out ??
If this string is going to be static you can use simple string functions like,
Lstring = Left("Your work item is 50% ready", 6)
NeededString = Right(Lstring, 18)
NeededString will contain 50%
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Posts: 26
Threads: 8
Joined: Jun 2009
Reputation:
0
07-08-2009, 02:35 PM
Thanks all will try the options
Posts: 4
Threads: 2
Joined: Jul 2009
Reputation:
0
07-14-2009, 01:30 AM
Hi this method is not working too well, sometimes the value is 4%, so if i do i left(bla blah blah) it gets he wrong value. Is there a way i can specify to always get the numerical value after ""ïs"".
Thanks
Posts: 50
Threads: 0
Joined: Jul 2009
Reputation:
0
07-14-2009, 08:53 AM
Hi
Did u try this ?
String1 = "Your work item is 50% ready"
String2 = Split(String1,"is")
String3 = Split(String2(1),"ready")
msgbox String3(0)