How to remove Leading/Trailing Spaces from the String
Posted on January 5, 2009
1 2 3 4 5 6 | 'String Manipulation - How to remove Leading/Trailing Spaces from the String MyString = " MyText " String1 = Trim(MyString) 'To Remove leading and trailing spaces in MyString. will display "MyText". String1 = LTrim(MyString) 'To Remove leading spaces in MyString. will display "MyText ". String1 = RTrim(MyString) 'To Remove trailing spaces in MyString. will display " MyText". |
February 16th, 2009 - 21:04
How do we add a blank space at the end of a text box? Also, how do we make a MsgBox display variables on separate lines..e.g.
CODE
gData = nB1 & nB2 & aB1 & aB2 & tB & eB
MsgBox(gData)
END CODE
In this case, all of the gData variables will display in the message box. However, how do we get each one to display on individual line?
February 16th, 2009 - 23:39
To add a blank space after the text box content, you can use like:
MsgBox Text1.Text & space(1) & Text2.Textor
MsgBox Text1.Text & " " & Text2.TextTo display line breaking in msgbox use vbcrlf.
For example
Msgbox "This is " & vbcrlf & "test."it will be showed in two lines.
February 17th, 2009 - 13:54
Okay thank you I already figured it out but of course your help is helpful to me an others. Here is what I used:
MsgBox “Something” & vbNewLine & “Something”
Thanks, so now I know I can use either or.