[RESOLVED] Deleting all spaces from text
I'm v. new to VB and am trying to upload text into a data base but without the spaces.
I could only come up with a very long winded way using Trim and some other functions. Is there a way to do this more simply?
The text is alpha numeric with % symbols etc. and is sent to me in a single cell in Excel.
Any help much appreciated
Davellll
Re: Deleting all spaces from text
Hi davellll, welcome to VBForums! :wave:
Which version of VB are you using, and what sort of code have you got?
If you are using VB 6 (or VBA in Office), you can use Replace to remove characters, by replacing them with 'no text', eg:
VB Code:
yourstring = Replace(yourstring, " ", "")