Why not use
Code:
Dim LsStr As String * 20
LsStr = "Hello"
MsgBox "#" & LsStr & "#"
You'll see that even though you only put "Hello" into the string you will ALWAYS get 20 characters out (that's what the * 20 means) - so it is automatically padded with spaces.
The one thing to look out for is when you are comparing variables;
Code:
If LsStr = "Hello" Then
Msgbox "TRUE"
Else
Msgbox "FALSE"
End If
will return FALSE because "Hello" does not equal "Hello "
In these instances you should use TRIM; eg;
Code:
If Trim(LsStr) = "Hello" Then
Msgbox "TRUE"
Else
Msgbox "FALSE"
End If
TRIM removes any spaces from around the contents of LsStr and compares that with "Hello" - which will return TRUE.
Hope this helps.