More VB.net stuff

Discussion in 'Training & Development' started by zxspectrum, Sep 6, 2006.

  1. zxspectrum

    zxspectrum Terabyte Poster Forum Leader Gold Member

    2,092
    216
    244
    Can anyone tell me what the hell is up with this code, ive done what the book says and i get this

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    lbResult.Text = Str (val(textbox1.Text) + Val (textbox.2text))
    End Sub

    The error message says 'textbox' is a type and can not be used as an expression??

    basically im doing a simple adding machine, i can supply a pic if need be

    Eddie:oops:
     
    Certifications: BSc computing and information systems
    WIP: 70-680
  2. hbroomhall

    hbroomhall Petabyte Poster Gold Member

    6,624
    117
    224
    Was that a cut'n'paste? If so is textbox.2text correct - or should it be textbox2.Text ?

    Harry.
     
    Certifications: ECDL A+ Network+ i-Net+
    WIP: Server+
  3. zxspectrum

    zxspectrum Terabyte Poster Forum Leader Gold Member

    2,092
    216
    244
    Well done Harry , that was a good spot and its got rid of 2 errors, now im donw to one which is

    'sub main was not found in Adding_mnachine.form1

    Now the only thing i can think of is the naming of it ?? that above is exactly as it is in the error box

    Eddie
     
    Certifications: BSc computing and information systems
    WIP: 70-680
  4. zxspectrum

    zxspectrum Terabyte Poster Forum Leader Gold Member

    2,092
    216
    244
    Wow ive managed to work the last one out on my own, it was in the naming window, i named it lbresult, so now i changed it back to form1 and the thing is working whoo hoo

    Thanks for your help again Harry ill probabaly be back later lol
     
    Certifications: BSc computing and information systems
    WIP: 70-680

Share This Page

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.