Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default input box , msgbox, formula

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default input box , msgbox, formula

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default input box , msgbox, formula

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default input box , msgbox, formula

Thanks guys
That really helps
(no longer) Lost
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula to input value Gemi Excel Discussion (Misc queries) 4 April 1st 09 08:39 PM
input box = formula bar David494 Excel Discussion (Misc queries) 2 July 29th 05 03:44 PM
Using different lines in an input- or msgbox Syrus the Virus[_16_] Excel Programming 3 March 2nd 04 12:35 PM
CODE to select range based on User Input or Value of Input Field Sandi Gauthier Excel Programming 4 December 8th 03 03:22 PM
MsgBox and User Input Terrin Excel Programming 2 September 9th 03 09:05 PM


All times are GMT +1. The time now is 06:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"