All pastes #255878 Raw Edit

Bozq

public text v1 · immutable
#255878 ·published 2006-11-23 14:08 UTC
rendered paste body
Dim dblHeight As Double
Dim dblWidth As Double
Dim dblLength As Double
Dim dblWeight As Double
Dim dblSize As Double

Private Sub cmdCalculate_Click()
    dblHeight = Val(txtHeight.Text)
    dblWidth = Val(txtWidth.Text)
    dblLength = Val(txtLength.Text)
    dblWeight = Val(txtWeight.Text)
    dblSize = dblWidth * dblHeight * dblLength
    
    Select Case cmdCalculate
        Case dblSize > 100000
    MsgBox "Your package is too big", vbOKOnly, "Too big!"
        Case dblSize < 100000
    MsgBox "Your package is the right size", vbOKOnly, "Right size!"
    End Select
    
    Select Case cmdCalculate
        Case dblWeight > 27
    MsgBox "Your package is too heavy", vbOKOnly, "Too heavy!"
        Case dblWeight < 27
    MsgBox "Your package is the right weight", vbOKOnly, "Right weight!"
    End Select
    
End Sub

Private Sub cmdEnd_Click()
Unload frmMain
End Sub