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

Can textbox value be converted from "Alpha Bravo Charlie" to "ABC"?

P: 10
I am wondering if there is a way to convert the value of a text box to an acronym represented by the first letter of each word in the textbox.

i.e. User would input "Alpha Bravo Charlie" and this could be converted elsewhere to "ABC".

Any help would be great! :)
Mar 28 '12 #1

✓ answered by Rabbit

Use VBA to SPLIT() the string by spaces and take the LEFT() one character from each word.

Share this Question
Share on Google+
5 Replies


Rabbit
Expert Mod 10K+
P: 12,334
Use VBA to SPLIT() the string by spaces and take the LEFT() one character from each word.
Mar 28 '12 #2

NeoPa
Expert Mod 15k+
P: 31,299
Certainly I know of no way to handle this in a single step unless a procedure is written for the purpose. Rabbit's suggestion seems as good as you'll get.
Mar 28 '12 #3

100+
P: 759
Or collect only the capitals.
Mar 29 '12 #4

NeoPa
Expert Mod 15k+
P: 31,299
Don't confuse the example with the question Mihail. We only know for sure that the initials are required, not that the initials will always be capitalised ;-)
Mar 29 '12 #5

100+
P: 759
Correct, NeoPa.
So my vote is for Rabbit too :)
Mar 29 '12 #6

Post your reply

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