Results 1 to 5 of 5

Thread: keeping score

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Location
    Wales
    Posts
    12

    Post

    I am making an quiz program. And I am finding it hard to get a label to add on numbers to it. So when they get a question right it will add points on the score. Please help

    thanx

    Michael Baynham 15

  2. #2
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    Calgary Alberta
    Posts
    359

    Post

    label1.caption = cint(label1.caption) + 1

    or however many points you want to add. Or if the points are really hig use Clng(label1.caption)

    ------------------
    -------------------------
    I'm really easy to get along with once you people learn to
    worship me.
    -------------------------

  3. #3
    Guest

    Post

    Try this:
    Code:
    Label1.Caption = Val(Label1.Caption) + NewPoints

    ------------------
    Boothman
    There is a war out there, and it is about who controls the information, it's all about the information.


  4. #4
    Hyperactive Member PITBULLCJR's Avatar
    Join Date
    Nov 1999
    Location
    New York
    Posts
    408

    Post

    This would also work
    Dim score as integer
    score = score + 1
    label1.caption = score

    ------------------
    Sincerely,
    Chris
    :-) ;-)
    just have fun out there and live life to the fullest while it is still here
    Email [email protected]


  5. #5
    New Member
    Join Date
    Feb 2000
    Posts
    4

    Post

    If you wanted the score to update every time the user pressed the OK button, or whichever button you wanted them to press to answer a question, type this code:

    sub command1.click() (or whaterver it happens to be)
    score = score + 1 (or hwever many points you add per correct question)
    label1.caption = score

    If you are using more than one form for your quiz program and you want to be able to access it from every form thne first put this in a module...

    public score as integer

    -Edward Hinchliffe

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