why below macro not happening
its showing discount 0 for all condition
Sub discount()
Dim quantity As Variant
Dim discount As Integer
quantity = InputBox("enter ther quantity")
If quantity = "" Then Exit Sub
If quantity = 0 Then discount = 0.1
If quantity > 0 And quantity <= 25 Then discount = 0.15
If quantity > 25 And quantity < 75 Then discount = 0.25
MsgBox "discount " & discount
End Sub
its showing discount 0 for all condition
Sub discount()
Dim quantity As Variant
Dim discount As Integer
quantity = InputBox("enter ther quantity")
If quantity = "" Then Exit Sub
If quantity = 0 Then discount = 0.1
If quantity > 0 And quantity <= 25 Then discount = 0.15
If quantity > 25 And quantity < 75 Then discount = 0.25
MsgBox "discount " & discount
End Sub