LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Remove the right most 3 characters from a string



I had to the same thing as I was adding 001 002 etc.. to duplicate
filenames in VB.NET
If the file existed I added 001, if that existed I added 002, but
removing the 001 etc.. sometimes removed char from the middle of the
name or the first instance, so I deleted the last three chars as
below...

I used :

templength = filename.Length
filename = filename.Substring(0, templength - 3)



*** Sent via Developersdex http://www.developersdex.com ***
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove characters from string Niek Otten Excel Programming 12 January 29th 07 04:37 AM
Remove characters from string Ron Rosenfeld Excel Programming 3 January 28th 07 03:20 PM
Remove characters from string Helmut Weber[_2_] Excel Programming 2 January 28th 07 11:36 AM
Remove characters from string Zack Barresse Excel Programming 1 January 28th 07 07:52 AM
Remove all characters following the first character in a string RC Excel Discussion (Misc queries) 5 August 30th 05 03:17 AM


All times are GMT +1. The time now is 12:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"