Results 1 to 3 of 3

Thread: Why am i getting an error? easy question

  1. #1

    Thread Starter
    Registered User struntz's Avatar
    Join Date
    Aug 1999
    Location
    Brockway,Pa,USA
    Posts
    199

    Talking

    Hello!
    well i'm having a problem, my program is pointless but i do it because i don't know waht else to do heh, well this is what it does, all it does, is u type in the name of a music group, in either, heavy, pop, or clasical, and it will just add it to the text boxes, but i made a sub in a standard modeul and it isn't working! check it out, the Intellihence isn't picking up on it either..

    Code:
    Option Explicit
    
     Sub AddMuisc(TypeOfMusic As String, ReturnString As String)
            Dim Prompt As String
            Dim iBox As String
            Dim CharWrap As String
            
            Prompt = "Enter" & TypeOfMusic & " music group"
            iBox = InputBox(Prompt, "Add Music")
            CharWrap = vbCr + vbLf
            ReturnString = iBox & CharWrap
    End Sub

    thats the code in teh standard moduel here is one of the codes in teh command button named cmdHeavy
    Code:
    Private Sub cmdHeavy_Click()
    Dim Heavy As String
    
        AddMusic "Crazy", Heavy
        Text1.Text = Text1.Text & Heavy
    End Sub
    I get a Not defined Sub or somthing error, thanks for listening

  2. #2
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892
    It's mostly because you misspelled Music. (AddMuisc)

  3. #3

    Thread Starter
    Registered User struntz's Avatar
    Join Date
    Aug 1999
    Location
    Brockway,Pa,USA
    Posts
    199

    Red face

    hah well then, thats always a kick in the ass, thanks for the help!

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