Dim listprice As Double = 0 ' ebay listing price of item
Dim sellprice As Double = 0 ' ebay selling price of item
Dim shipprice As Double = 0 ' shipping fee charged for item
Dim list As Double = 0 ' fee charged by ebay for listing item based on price
Dim fvfee As Double = 0 ' final value fee charged by ebay based on the sales price
Dim option1 As Double = 0 ' option1-4 are add on's to the listing fee for upgraded listing
Dim option2 As Double = 0 '
Dim option3 As Double = 0 '
Dim option4 As Double = 0 '
Dim paypalfee As Double = 0 ' fee charged by paypal if used
Dim reserve As Double = 0 ' additional fee for a reserve price
Public Function ListFees() As Double
' Compute the initial ebay listing fee
' based on the listing price of the item
If IsNumeric(TextBox1.Text) = False Then
list = 0.0
Else
listprice = Double.Parse(TextBox1.Text) 'convert input string to number
Select Case listprice
Case 0.0
list = 0.0
Case 0.01 To 0.99
list = 0.25
Case 1 To 9.99
list = (0.35)
Case 10 To 49.99
list = (0.6)
Case 50 To 199.99
list = 2.4
Case 200 To 499.99
list = 3.6
Case Is >= 500
list = 4.8
End Select
End If
End Function
Public Function reservefee() As Double
If IsNumeric(TextBox4.Text) = False Then
reserve = 0.0
Else
reserve = Double.Parse(TextBox4.Text) 'convert input string to number
Select Case reservefee
Case 0.0
reserve = 0.0
Case 0.01 To 49.99
reserve = 1.0
Case 50 To 199.99
reserve = 2.0
Case Is > 200
reserve = Double.Parse(TextBox4.Text) * 0.01
End Select
End If
End Function
Function FinalValue() As Double
' compute final value fee
' based on the sales price
If IsNumeric(TextBox2.Text) = False Then
list = 0.0
Else
sellprice = Double.Parse(TextBox2.Text)
Select Case sellprice
Case 0 To 25
fvfee = (sellprice * 0.0525)
Case 25.01 To 1000
fvfee = (sellprice - 25) * 0.0275 + 1.31
Case Is > 1000
fvfee = (sellprice - 1000) * 0.015 + 28.12
End Select
End If
End Function
Function Options() As Double
' This section will compute the numeric value of each selected listing option
' each respective value is stored in the variable "option"
' followed by the box number (ie, option1 for combobox1
' compute the numeric value of each option selection combo1
Select Case ComboBox1.Text
Case "Select"
option1 = 0
Case "Gallery Picture"
option1 = 0.35
Case "Listing Designer"
option1 = 0.1
Case "Item Subtitle"
option1 = 0.5
Case "Bold"
option1 = 1
Case "10 Day Auction"
option1 = 0.4
Case "Gift Service"
option1 = 0.25
Case "Border"
option1 = 3
Case "Highlight"
option1 = 5
Case "Featured Plus"
option1 = 19.95
Case "Gallery Featured"
option1 = 19.95
Case "Home Page Featured"
option1 = 39.95
Case "Scheduled Listing"
option1 = 0.1
End Select
' compute the numeric value of each selection combo2
Select Case ComboBox2.Text
Case "Select"
option2 = 0
Case "Gallery Picture"
option2 = 0.35
Case "Listing Designer"
option2 = 0.1
Case "Item Subtitle"
option2 = 0.5
Case "Bold"
option2 = 1
Case "10 Day Auction"
option2 = 0.4
Case "Gift Service"
option2 = 0.25
Case "Border"
option2 = 3
Case "Highlight"
option2 = 5
Case "Featured Plus"
option2 = 19.95
Case "Gallery Featured"
option2 = 19.95
Case "Home Page Featured"
option2 = 39.95
Case "Scheduled Listing"
option2 = 0.1
End Select
' compute the numeric value of each selection combo3
Select Case ComboBox3.Text
Case "Select"
option3 = 0
Case "Gallery Picture"
option3 = 0.35
Case "Listing Designer"
option3 = 0.1
Case "Item Subtitle"
option3 = 0.5
Case "Bold"
option3 = 1
Case "10 Day Auction"
option3 = 0.4
Case "Gift Service"
option3 = 0.25
Case "Border"
option3 = 3
Case "Highlight"
option3 = 5
Case "Featured Plus"
option3 = 19.95
Case "Gallery Featured"
option3 = 19.95
Case "Home Page Featured"
option3 = 39.95
Case "Scheduled Listing"
option3 = 0.1
End Select
' compute the numeric value of each selection combo4
Select Case ComboBox4.Text
Case "Select"
option4 = 0
Case "Gallery Picture"
option4 = 0.35
Case "Listing Designer"
option4 = 0.1
Case "Item Subtitle"
option4 = 0.5
Case "Bold"
option4 = 1
Case "10 Day Auction"
option4 = 0.4
Case "Gift Service"
option4 = 0.25
Case "Border"
option4 = 3
Case "Highlight"
option4 = 5
Case "Featured Plus"
option4 = 19.95
Case "Gallery Featured"
option4 = 19.95
Case "Home Page Featured"
option4 = 39.95
Case "Scheduled Listing"
option4 = 0.1
End Select
End Function
Public Function PaypalFees() As Double
If IsNumeric(TextBox2.Text) = False Then
paypalfee = 0.0
Else
paypalfee = (sellprice + shipprice) * 0.029 + 0.3
End If
End Function