Thread
:
Combining TextBox Values With Spaces
View Single Post
#
3
Posted to microsoft.public.excel.programming
Nigel[_2_]
external usenet poster
Posts: 735
Combining TextBox Values With Spaces
Assuming you want all spaces except between textbox values removed then try
this one liner......
TextBox5.Value = Trim(Trim(TextBox1.Value) & " " & _
Trim(Trim(TextBox2.Value) & " " & _
Trim(Trim(TextBox3.Value) & " " & _
Trim(TextBox4.Value))))
--
Regards,
Nigel
"Minitman" wrote in message
...
Greetings,
I have four Textboxes on a UserForm that may or may not have anything
in them. I am trying to combine the contents of the 4 TextBoxes plus
one space between each value into a 5th Textbox. I tried brute force
and ended up with a long sub (about 130 lines - long lines wrapped for
legibility. Will post if needed).
The TextBoxes contain text. Which is why I need spaces between the
text. I have no way of knowing which of the four are going to have
anything in them.
Any ideas as to a better way to do this?
Any help will be appreciated.
-Minitman
Reply With Quote
Nigel[_2_]
View Public Profile
Find all posts by Nigel[_2_]