I have a string that has a large ammount of spaces between the words as well as carrage returns. I need to get rid of those non essential spaces, as well as the carrage returns so that I have one big long string. Any ideas?
Printable View
I have a string that has a large ammount of spaces between the words as well as carrage returns. I need to get rid of those non essential spaces, as well as the carrage returns so that I have one big long string. Any ideas?
You may want to use the Replace function.
Get the idea? Need more? Ask.Code:Dim mystring As String
mystring = "Hello" & vbCr & "Hi" & vbCr & "Bye"
MsgBox mystring
MsgBox Replace(mystring, vbCr, "")
'replaces all carriage returns with nothing