Skip to content

Instantly share code, notes, and snippets.

@JamesTheBard
Last active December 17, 2015 19:19
Show Gist options
  • Save JamesTheBard/5659942 to your computer and use it in GitHub Desktop.
Save JamesTheBard/5659942 to your computer and use it in GitHub Desktop.
The first issue that I see...
' This is what you have Arlen...
do while MoreSold = "yes"
' Notice that you have 'FoodType'
FoodType = Inputbox("What type of food sold? (hamburger, hotdog, corndog, or nacho)")
NumSold = Inputbox("How many were sold?")
' ...and you have 'foodtype' here...
Select Case foodtype
Case "hamburger"
NumSold = NumHamburgers
HamburgerCost = NumHamburgers * 4
@JamesTheBard
Copy link
Author

Okay, I see your problem. For example, in each Case statement you're trying to assign the NumFood into NumSold. For example:

Case "pizza"
    NumSold = NumPizza

You should be assigning NumSold to the food-specific variable. Assignments work from right to left across the equal sign to NumSold -> NumPizza. It should be:

Case "pizza"
    NumPizza = NumSold

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment