All pastes #270572 Raw Edit

sexy

public text v1 · immutable
·published 2006-12-07 14:37 UTC
rendered paste body
Dim dblTotal As Double, dblInput As Double

Private Sub cmdDone_Click()
    End                 
End Sub

Private Sub cmdStart_Click()
    dblInput = 0            
    dblTotal = 0
    For i = 1 To 5          
        dblInput = InputBox("Please enter value number " & i, "Value " & i) 
        dblTotal = dblTotal + dblInput  
    Next i
    dblTotal = dblTotal / 5 'calculates average
    lblAnswer.Caption = "Your average number of visitors is " & dblTotal    
    MsgBox "Your average number of visitors is " & dblTotal, , "Average"    
End Sub