Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to trim 2 chars from the right 1

Status
Not open for further replies.

flashbbeb

MIS
Mar 29, 2005
106
US
Hello,

I'm sure this is easier than I think (newbie), but how do I trim a couple characters from the right of a string?

I'm trying to extract a 4 or 5 digit number and have only gotten so far in the task.

Code:
uniqueNumber1 = nameLink.GetROProperty("href")
'returns the javascript URL
uniqueNumber2 = Mid(uniqueNumber1,35)
'goes 35 chars into the string so for example I'll get 5832);

How would remove just those last two characters (close paren and semi-colon) from the right?

Thanks,
EB
 
Just got it.

uniqueNumberBLAH = Left(uniqueNumber2,Len(uniqueNumber2) - 2)
 
Thanks pwise - you must have posted right before I figured it out!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top