I need help

Discussion in 'Code Snippets and Tutorials' started by the_skip, Feb 13, 2007.

  1. the_skip

    the_skip Level IV

    Joined:
    Dec 25, 2006
    Messages:
    2,354
    Likes Received:
    1
    Location:
    Indiana
    I am making a neopoints calculator in vb6 and here is the calculation code
    Code (Text):
    1. Private Sub Command1_Click()
    2. Dim ratio As Double
    3. Dim results As Double
    4. Dim Points As Double
    5. Select Case Combo1.Text
    6.             Case "200m Peanut Dash"
    7.             ratio = 0.75
    8.             Case Else
    9.             ratio = 1
    10.             End Select
    11. Points = ratio * results
    12. Lblresults.Text = Points
    13. End Sub
    it gives me the error when I clikc the button
    Then it shows me the code and highlights Private Sub Command1_Click()
     
  2. ricky92

    ricky92 Administrator
    Staff Member

    Joined:
    Nov 10, 2006
    Messages:
    1,866
    Likes Received:
    67
    Check the name of every control on your form...
     
  3. the_skip

    the_skip Level IV

    Joined:
    Dec 25, 2006
    Messages:
    2,354
    Likes Received:
    1
    Location:
    Indiana
    I fixed it
    it is supposed to be
    Code (Text):
    1. Lblresults.Caption = Points
    not
    Code (Text):
    1. Lblresults.text = Points