garyc
12-15-2008, 06:21 AM
I wanna eliminate part of message like a comma or a word at the end of message. How can I do it.
For example,
Sub messagetry()
Dim msg As String, i As Integer
For i = 1 To 5
msg = msg + CStr(i) + ", "
Next i
MsgBox msg
End Sub
The output of this is :
1, 2, 3, 4, 5,
How can I eliminate the comma behind 5.
There can only be "+" but no "-" in the equation [msg = ......]
Thanks!
For example,
Sub messagetry()
Dim msg As String, i As Integer
For i = 1 To 5
msg = msg + CStr(i) + ", "
Next i
MsgBox msg
End Sub
The output of this is :
1, 2, 3, 4, 5,
How can I eliminate the comma behind 5.
There can only be "+" but no "-" in the equation [msg = ......]
Thanks!