|
-
May 19th, 2000, 11:23 PM
#1
Thread Starter
Junior Member
setting a string lenth
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.
-
May 19th, 2000, 11:28 PM
#2
you can set a length at declaration time like this:
Code:
Public MyString as string * 45
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.
hows that?
[Edited by wossname on 05-20-2000 at 06:28 PM]
-
May 20th, 2000, 01:25 AM
#3
Code:
Private Sub Form_Load()
Dim stringthing As String * 5
stringthing = "123456"
Me.Caption = stringthing
End Sub
instead of throwing an error, this gets the first five numbers, and turns it into the caption of the form.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|