String manipulation 
Author Message
 String manipulation

I know this is a simple question but I am very new with VB.  If I use
Left("String",40) it gives me the first 40 characters.  What I need is a way
to DROP the first 40 characters.  I can't use Right("....",40) since I don't
know the exact size from the right.  There must be a way to cut the first 40
characters from a string.

Thanks,
Jeff

P.S.
I am doing this in VBScript which to my understanding is very similat to VB.



Sun, 15 Feb 2004 00:08:58 GMT  
 String manipulation
Why don't you know the length? LEN("String") returns a 6.

IF LEN(strTest)>40 THEN
  strTest = RIGHT(strTest, (LEN(strTest) - 40))
ENDIF

On Tue, 28 Aug 2001 10:08:58 -0600, "Jeff Boyer"

Quote:

>I know this is a simple question but I am very new with VB.  If I use
>Left("String",40) it gives me the first 40 characters.  What I need is a way
>to DROP the first 40 characters.  I can't use Right("....",40) since I don't
>know the exact size from the right.  There must be a way to cut the first 40
>characters from a string.

>Thanks,
>Jeff

>P.S.
>I am doing this in VBScript which to my understanding is very similat to VB.



Sun, 15 Feb 2004 02:33:49 GMT  
 String manipulation


Quote:
> I know this is a simple question but I am very new with VB.  If I use
> Left("String",40) it gives me the first 40 characters.  What I need is a
way
> to DROP the first 40 characters.  I can't use Right("....",40) since I
don't
> know the exact size from the right.  There must be a way to cut the first
40
> characters from a string.

Right(StringName, Len(StringName) - 40)

Check to make sure that StringName is longer than 40, or you'll get
a fatal error when it's not.

Terry Austin



Sun, 15 Feb 2004 02:07:40 GMT  
 String manipulation
Try:

Mid("String", 40)

Good luck

On Tue, 28 Aug 2001 10:08:58 -0600, "Jeff Boyer"

Quote:

>I know this is a simple question but I am very new with VB.  If I use
>Left("String",40) it gives me the first 40 characters.  What I need is a way
>to DROP the first 40 characters.  I can't use Right("....",40) since I don't
>know the exact size from the right.  There must be a way to cut the first 40
>characters from a string.

>Thanks,
>Jeff

>P.S.
>I am doing this in VBScript which to my understanding is very similat to VB.



Sun, 15 Feb 2004 20:18:47 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. string manipulation, string routines, etc.

2. String manipulation

3. String Manipulation

4. VBA String Manipulation DLL Missing

5. String manipulation in VBA

6. String Manipulation

7. String manipulation with vbscript

8. String manipulation topic

9. String manipulation...

10. Text String Manipulation

11. Newbie question : string manipulation with VBscript.

12. String manipulation

 

 
Powered by phpBB® Forum Software