Visual Basic Nightmare: Need Yes/No ComboBox Help Please (Have a deadline)
I have a deadline today and have been working on this for a LONG time, please help....
I have created a simple form for a brief survey. In this survey the user is asked 3 Yes/No questions in addition to 8 others where they input numbers for answers. At the end of the form the user presses a button to calculate their totals. (It won't calculate.)
I have it almost right but when I debug, it does not calculate. (I get a error:
Conversion from "Yes" to type 'double' is not valid) and than it highlights my combobox code in yellow
---------------------------------------------
'Convert combo box data to variables
typicallyPurchasedFoodAndBeverages = typicallyPurchasedFoodAndBeveragesCombobox.Text
typicallyPurchasedTShirt = typicallyPurchasedTShirtCombobox.Text
typicallyPurchasedCDAtHeadlinerConcertsOrMusicals = typicallyPurchasedCDAtHeadlinerConcertsOrMusicalsCombobox.Text
'Calculate the total cost of T-shirts
If typicallyPurchasedTShirt = Yes Then
totalCostOfTShirts = totalNumberOfHeadlinerConcertsAndMusicalsAndSportsGamesAttended * 20
Else
totalCostOfTShirts = 0
End If
'Calculate totalCostOfCDs
If typicallyPurchasedCDAtHeadlinerConcertsOrMusicals = Yes Then
totalCostOfCDs = totalNumberOfHeadlinerConcertsAndMusicalsAttended * 15
Else
totalCostOfCDs = 0
End If
If typicallyPurchasedFoodAndBeverages = Yes Then
totalCostOfFoodAndBeverages = totalNumberOfEventsAttended * 6
Else
totalCostOfFoodAndBeverages = 0
End If
---------------------------------------------
Example of Questions:
How many times have you attended a play at a local Community College? <>
Do you typically purchase a T-shirt when you attend a concert, musical or sports game? <>
if they answer yes than the number of events they have attended that sell T-shirts is multiplied by the cost of T-shirts to be added to the calculation