Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hey all, still quite a newbie here.
I need to create something that calculates values entered into input boxes and displays them in a msgbox. This is what I have so far: Sub standard1() fconc = InputBox("Enter final conc.") fvol = InputBox("Enter final volume") sconc = InputBox("Enter conc. of standard") MsgBox = "fconc*fvol/sconc" End Sub Of course I ge an error at the msgbox line because I don't know what I'm doing, but that is the formula I need..fconc x fvol / sconc. Any help would be greatly appreciated. Thanks, Lost. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
lost wrote:
Hey all, still quite a newbie here. I need to create something that calculates values entered into input boxes and displays them in a msgbox. This is what I have so far: Sub standard1() fconc = InputBox("Enter final conc.") fvol = InputBox("Enter final volume") sconc = InputBox("Enter conc. of standard") MsgBox = "fconc*fvol/sconc" End Sub Of course I ge an error at the msgbox line because I don't know what I'm doing, but that is the formula I need..fconc x fvol / sconc. Any help would be greatly appreciated. Thanks, Lost. Remove the quotes in the MsgBox, as in: MsgBox = fconc * fvol /sconc -- Regards, Juan Pablo González |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Lost,
This what you want fconc = InputBox("Enter final conc.") fvol = InputBox("Enter final volume") sconc = InputBox("Enter conc. of standard") MsgBox "Value is " & fconc * fvol / sconc if you want to format it, try fconc = InputBox("Enter final conc.") fvol = InputBox("Enter final volume") sconc = InputBox("Enter conc. of standard") MsgBox "Value is " & Format(fconc * fvol / sconc, "#,##0.00") -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "lost" wrote in message ... Hey all, still quite a newbie here. I need to create something that calculates values entered into input boxes and displays them in a msgbox. This is what I have so far: Sub standard1() fconc = InputBox("Enter final conc.") fvol = InputBox("Enter final volume") sconc = InputBox("Enter conc. of standard") MsgBox = "fconc*fvol/sconc" End Sub Of course I ge an error at the msgbox line because I don't know what I'm doing, but that is the formula I need..fconc x fvol / sconc. Any help would be greatly appreciated. Thanks, Lost. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks guys
That really helps (no longer) Lost |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formula to input value | Excel Discussion (Misc queries) | |||
input box = formula bar | Excel Discussion (Misc queries) | |||
Using different lines in an input- or msgbox | Excel Programming | |||
CODE to select range based on User Input or Value of Input Field | Excel Programming | |||
MsgBox and User Input | Excel Programming |