is there any way i can set the lenths of strings so if i join two strings together the second string will allways start in the same place not matter hoe long the first string is.
Printable View
is there any way i can set the lenths of strings so if i join two strings together the second string will allways start in the same place not matter hoe long the first string is.
you can set a length at declaration time like this:
which will cause the string to maintain a length of 45. if you assign a string of (say) 10 characters to it, then the remaining 35 will be space filled.Code:Public MyString as string * 45
hows that?
[Edited by wossname on 05-20-2000 at 06:28 PM]
instead of throwing an error, this gets the first five numbers, and turns it into the caption of the form.Code:Private Sub Form_Load()
Dim stringthing As String * 5
stringthing = "123456"
Me.Caption = stringthing
End Sub