|
-
Feb 2nd, 2000, 02:33 AM
#1
Thread Starter
New Member
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
-
Feb 2nd, 2000, 02:39 AM
#2
Hyperactive Member
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.
-------------------------
-
Feb 2nd, 2000, 02:39 AM
#3
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.
-
Feb 2nd, 2000, 04:14 AM
#4
Hyperactive Member
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]
-
Feb 2nd, 2000, 05:52 AM
#5
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|