Im running program and the relational operator seems to overlap
Option Explicit
Private Sub Clear_Click()
Cells(7, 6) = ""
Cells(8, 6) = ""
Cells(9, 6) = ""
Cells(10, 6) = ""
Cells(11, 6) = ""
End Sub
Private Sub CommCalc_Click()
'everyones base pay is 1000.00
'commission is 0
' sell more than 100000 - commission is 3%
' sell more than 200000 - commission is 4%
' sell more than 300000 - commission is 4.5%
'user enters name ans sales amount
Cells(7, 6) = ""
Cells(8, 6) = ""
Cells(9, 6) = ""
Cells(10, 6) = ""
Cells(11, 6) = ""
Const curBASE_PAY As Currency = 1000
Dim curComsn As Currency
Dim curTotSales As Currency
Dim curTotal As Currency
Call Clear_Click
'input-------------------------------------------------
Name = InputBox("Name?")
curTotSales = InputBox("Amount of Total Sales?")
'processing--------------------------------------------
If (curTotSales < 100000) Then
curComsn = curTotSales * 0
curTotal = curBASE_PAY + curComsn
End If
If (curTotSales > 100000 < 200000) Then
curComsn = curTotSales * 0.03
curTotal = curBASE_PAY + curComsn
End If
If (curTotSales > 200000 < 300000) Then
curComsn = curTotSales * 0.04
curTotal = curBASE_PAY + curComsn
End If
'If (intQty >= 10) Then
' curTotal = curTotal * 0.9
'End If
'output-----------------------------------------------
Cells(7, 6) = Name
Cells(8, 6) = curTotSales
Cells(9, 6) = curBASE_PAY
Cells(10, 6) = curComsn
Cells(11, 6) = curTotal
End Sub
Option Explicit
Private Sub Clear_Click()
Cells(7, 6) = ""
Cells(8, 6) = ""
Cells(9, 6) = ""
Cells(10, 6) = ""
Cells(11, 6) = ""
End Sub
Private Sub CommCalc_Click()
'everyones base pay is 1000.00
'commission is 0
' sell more than 100000 - commission is 3%
' sell more than 200000 - commission is 4%
' sell more than 300000 - commission is 4.5%
'user enters name ans sales amount
Cells(7, 6) = ""
Cells(8, 6) = ""
Cells(9, 6) = ""
Cells(10, 6) = ""
Cells(11, 6) = ""
Const curBASE_PAY As Currency = 1000
Dim curComsn As Currency
Dim curTotSales As Currency
Dim curTotal As Currency
Call Clear_Click
'input-------------------------------------------------
Name = InputBox("Name?")
curTotSales = InputBox("Amount of Total Sales?")
'processing--------------------------------------------
If (curTotSales < 100000) Then
curComsn = curTotSales * 0
curTotal = curBASE_PAY + curComsn
End If
If (curTotSales > 100000 < 200000) Then
curComsn = curTotSales * 0.03
curTotal = curBASE_PAY + curComsn
End If
If (curTotSales > 200000 < 300000) Then
curComsn = curTotSales * 0.04
curTotal = curBASE_PAY + curComsn
End If
'If (intQty >= 10) Then
' curTotal = curTotal * 0.9
'End If
'output-----------------------------------------------
Cells(7, 6) = Name
Cells(8, 6) = curTotSales
Cells(9, 6) = curBASE_PAY
Cells(10, 6) = curComsn
Cells(11, 6) = curTotal
End Sub