Need Help Summing with Input Box

shivahsingh

New Member
Joined
Oct 1, 2014
Messages
10
This is what I have So far

price = InputBox(prompt:="Enter Price of Pencils") + price = InputBox(prompt:="Enter Price of Pens") + price = InputBox(prompt:="Enter Price of Erasers") + price = InputBox(prompt:="Enter Price of Backpack")




Result = "The total you will pay is" & price
MsgBox Result


i want the user to enter the prices and then the sum will be displayed in a messagebox as currency
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Try

Code:
Price = InputBox(prompt:="Enter Price of Pencils")
Price = Price + InputBox(prompt:="Enter Price of Pens")
Price = Price + InputBox(prompt:="Enter Price of Erasers")
Price = Price + InputBox(prompt:="Enter Price of Backpack")
Result = "The total you will pay is " & Price
MsgBox Result
 
Upvote 0
Thank you very much, that worked!, i still cant get my price to display as currency, I declared dim price as currenncy but displays as an interger
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,588
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top