Results 1 to 6 of 6

Thread: String(Y, str)

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2005
    Posts
    300

    String(Y, str)

    Ok i have this coding.

    Code:
    Public Sub xXxoOozZz()
    
    Dim Y As Integer, Z As Integer
    Dim X As Long
    Dim str As String, Word As String, NewWord As String
    str = InputBox("Choose Letter (s) To Gen With", "Choose Letter !")
    X = lstRoot.ListCount - 1
    lstRoot.ListIndex = X
    Y = 1
    Z = 0
    
    Do Until X = -1
    
        Do While Z <= 32
            Do While Y <= 32
                Word = txtBefore.Text & lstRoot.List(X) & txtAfter.Text
                NewWord = String(Y, str) & Word & String(Z, str)
            If Len(NewWord) <= 32 Then lstGen.AddItem NewWord
            Y = Y + 1
            Loop
            Y = 0
            Z = Z + 1
            Loop
            X = X - 1
            Y = 0
            Z = 0
            Loop
    End Sub
    if Str has the value = XoX if will only take the X
    how would i make it take the whole value but still do the Looping thing.
    Im Learning !!!!

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: String(Y, str)

    Why don't you copy down what you have the user enter, and then what you want the program to display. It is very confusing as to what is and isn't happening correctly with your example.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2005
    Posts
    300

    Re: String(Y, str)

    User enters a Word lets say Ricky.

    I want program to do this.
    Ask the user for an input. could be a single letters could be a few letters. my code above works for single letters but not for a few letters.

    user decides on XoX.

    program will make.

    XoXRicky
    XoXXoXRicky
    XoXXoXXoXRicky
    XoXXoXXoXXoXRicky
    RickyXoX
    RickyXoXXoX
    XoXRickyXoX
    XoXRickyXoXXoX

    Get me now ??
    Im Learning !!!!

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2005
    Posts
    300

    Re: String(Y, str)

    *bump*
    Im Learning !!!!

  5. #5
    Banned timeshifter's Avatar
    Join Date
    Mar 2004
    Location
    at my desk
    Posts
    2,465

    Re: String(Y, str)

    Just a few For loops would do what you need...

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2005
    Posts
    300

    Re: String(Y, str)

    wana explain that a little better timeshifter.
    Im Learning !!!!

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