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
 

Some videos you may like

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
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
 

shivahsingh

New Member
Joined
Oct 1, 2014
Messages
10
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
 

Watch MrExcel Video

Forum statistics

Threads
1,108,960
Messages
5,525,904
Members
409,671
Latest member
nasseralateek

This Week's Hot Topics

Top