Results 1 to 3 of 3

Thread: setting a string lenth

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Location
    london
    Posts
    31

    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.
    D Stonebanks

  2. #2
    Guest
    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]

  3. #3
    Guest
    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
  •  



Click Here to Expand Forum to Full Width