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