Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Remove spaces
Hi All,
How could I remove all spaces from a text? I have a userform with a text box. when the user input some text there I want to get that text in to my sheet1 A1 removeing all spaes. for eg. if the text is "This is my text" then A1 should get "thisismytext" any help? TIA Soniya |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Remove spaces
Try this...
Private Sub CommandButton1_Click() Range("A1").Value = Replace(TextBox1.Text, " ", "") End Sub Soniya wrote: Hi All, How could I remove all spaces from a text? I have a userform with a text box. when the user input some text there I want to get that text in to my sheet1 A1 removeing all spaes. for eg. if the text is "This is my text" then A1 should get "thisismytext" any help? TIA Soniya |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Remove spaces
Replace works for xl2000 onward, for all versions
Range("A1").Value = Application.Substitute(Textbox1.Text," ","") -- Regards, Tom Ogilvy "Soniya" wrote in message ... Hi All, How could I remove all spaces from a text? I have a userform with a text box. when the user input some text there I want to get that text in to my sheet1 A1 removeing all spaes. for eg. if the text is "This is my text" then A1 should get "thisismytext" any help? TIA Soniya |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Remove spaces phonenumbers | Excel Discussion (Misc queries) | |||
How can i remove spaces? | Excel Discussion (Misc queries) | |||
how do I remove leading spaces and leave the remianing spaces w | Excel Worksheet Functions | |||
Remove all spaces in a cell... | Excel Worksheet Functions | |||
How do I remove spaces | Excel Discussion (Misc queries) |