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

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
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,392
Messages
6,119,257
Members
448,880
Latest member
aveternik

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