By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,961 Members | 1,333 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,961 IT Pros & Developers. It's quick & easy.

Removing a Character and the end of a string

P: 121
I have a VB code that generates a string. I need to remove the last character from the string - it is a ")".

I was trying to use the left command, but because it is a variable length string, i can't assign ONE number for the Left(....,#).

Any suggestions? Ideas?

Apr 22 '07 #1
Share this Question
Share on Google+
2 Replies

P: 36
Expand|Select|Wrap|Line Numbers
  1. strYourString = Mid(strYourString, 1, Len(strYourString)-1)
Apr 22 '07 #2

Expert 5K+
P: 8,434
Arnold is correct. But personally, I believe I would go with your original idea of using Left() function. Just substitute Len(strYourString)-1 as he has done. There's no difference in functionality and likely to be no difference in performance, so why bother with the extra parameter?
Apr 22 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.