I am trying to do a project that will calculate the weekly pay for employees at an Amusement Park.
When I run it and put numbers in the text boxes I get an error saying "Conversion from String to type Double is not valid".
Can someone kindly explain where I went wrong?
Dim ticketCollection As Double
Dim foodService As Double
Dim cleaningService As Double
Dim ridingAssistance As Double
Dim totalAmount As Double
Dim totalCollectionPay As Double
Dim totalFoodPay As Double
Dim totalCleaningPay As Double
Dim totalRidingPay As Double
ticketCollection = txtCollection.Text
foodService = txtFood.Text
cleaningService = txtCleaning.Text
ridingAssistance = txtRide.Text
totalCollectionPay = ticketCollection * 5
totalFoodPay = foodService * 10
totalCleaningPay = cleaningService * 6
totalRidingPay = ridingAssistance * 5
totalAmount = totalCollectionPay + totalFoodPay + totalCleaningPay + totalRidingPay
lblTotalDue.Text = totalAmount