Parcel Charge Problem Code

Private Sub cmdCharge_Click())

    Dim sngWeight As Single

    Dim curCost As Currency

   

    sngWeight = Val(InputBox("Please Enter Weight of Parcel", _

        "Numeric Parcel Weight"))

   

    If sngWeight < 2.5 Then

        curCost = sngWeight * 3.5

    ElseIf sngWeight >= 2.5 And sngWeight <= 5 Then

        curCost = sngWeight * 2.85

    Else

        curCost = sngWeight * 2.45

    End If

   

MsgBox "Parcel Weight: " & Str(sngWeight) & "kg" _

        & " Parcel Cost is " & "$" & Str(curCost), vbOKOnly, "Parcel Charges“

End Sub