Thread: Schoolwork help
View Single Post
Old Dec 5th, 2005, 7:39 PM   #14
Psychosis
Newbie
 
Join Date: Nov 2005
Posts: 5
Rep Power: 0 Psychosis is on a distinguished road
Okay, lost again. I posted this in the online course bullitin too, but it seems you guys respond faster.

Quote:
I've got my code working (kind of) - but honestly, I'm kind of lost. I've been following along with the instructions, and ordering the lines as the assignment goes, but I think I'm getting my variables mixed up...

------------------

'Computer Science 40S
'Unit 1: Review Excercise

Dim intNumber As Integer
Dim intTotal As Integer
Dim intRandom As Integer

Private Sub btnClick_Click()

intNumber = intNumber + 1

lblCount.Caption = "Count: " & intNumber

intRandom = 50 <=Rnd * 51 + 50 < 101

lstNumbers.AddItem FormatNumber(intTotal, 1)

intTotal=intTotal + intNumber
lblTotal.Caption="Total:" & vbCrLf & FormatNumber(intTotal, 1)

End Sub
Psychosis is offline   Reply With Quote