Results 1 to 2 of 2

Thread: SIMPLE: For spanish, Crossword, Help, EASY, IM stupid! Help, Take 2 secs! Due Friday!

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2001
    Location
    Heaven........ Whats that fire doing here?
    Posts
    39

    Question SIMPLE: For spanish, Crossword, Help, EASY, IM stupid! Help, Take 2 secs! Due Friday!

    Ok I am making a crossword for spanish for extra credit, to get my A+ and so I asked her If I could make it a computer program, I want the user to be able to type the answer in the answer box and then have the letters go into the txt boxes,
    (i.e. 25. Hace calor) then press enter and it will type the letters in for you..... This is what I have,

    Private Sub Cmd_Answer_Click()
    If Txt_answer = "50. Nick Chamberlin" Then
    MsgBox "No you fool! Don't type the example!"
    End If

    CODE:

    If Txt_answer = "1. Hace Calor" Then
    HaceCalor(0).Text = "H" And HaceCalor(1).Text = "a" And HaceCalor(2).Text = "c" And HaceCalor(3).Text = "e" And HaceCalor(4).Text = " " And HaceCalor(5).Text = "C" And HaceCalor(6).Text = "a" And HaceCalor(7).Text = "l" And HaceCalor(8).Text = "o" And HaceCalor(9).Text = "r"
    End
    End If
    End Sub

    And it keeps on highlighting the haceCalor(0-9) statements, it says something like mismatch.... WHAT THE HECK?!?!?! Please help, I need an answer as soon as possible, It is probably soooo easy, Im just very incompitant! THANKS!
    []:::::::::::[];;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;/

    Did you know that you can be your own grandpa?! It's really cool. . . . . .
    ------------------------------------------------
    But I'm not. . . Im just Myself. . . . .
    Not my own grandpa. . . . . .

    I put on my own pants today. . . . .
    Im so proud of myself. . . . .

  2. #2
    Frenzied Member Jim Davis's Avatar
    Join Date
    Mar 2001
    Location
    Mars base one Username: Jim Davis Password: yCrm33
    Posts
    1,284
    VB Code:
    1. Dim X as Long
    2. Dim MyArray() As String
    3.  
    4. If Txt_answer = "1. Hace Calor" Then
    5.  
    6. 'Just skip the numeric from the start of the string:
    7. X = Instr(Txt_answer," ")
    8. Txt_answer = Mid$(Txt_answer,X+1)
    9.  
    10. 'then split the chars into the array
    11.  
    12.  
    13. Redim MyArray(Len(Txt_answer))
    14.  
    15. For X = 1 to Len(Txt_answer)
    16.  MyArray(X) = Mid$(Txt_answer,x,1)
    17. Next X

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