ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   setting up a inputbox with a number value (https://www.excelbanter.com/excel-worksheet-functions/238745-setting-up-inputbox-number-value.html)

ozchick

setting up a inputbox with a number value
 
Hi guys,
I am trying to set up a inputbox for a macro which will display a employees
name and a number value as well is it possible?
I am running excel 2007. this is for a assignment

Luke M

setting up a inputbox with a number value
 
If you're just displaying data, you may want to just use a msgbox. InputBox's
are genearlly used to gather data. Here's an example with both being used:

Sub DisplayName()
'Gather info
xName = InputBox("What is the name?", "Name")
xValue = InputBox("What is the value?", "Value")

'Display info
MsgBox "The name is: " & xName & vbNewLine & _
"The value is: " & xValue
End Sub


--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"ozchick" wrote:

Hi guys,
I am trying to set up a inputbox for a macro which will display a employees
name and a number value as well is it possible?
I am running excel 2007. this is for a assignment



All times are GMT +1. The time now is 05:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com