setting up a inputbox with a number value

  • Thread starter Thread starter ozchick
  • Start date Start date
O

ozchick

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
 
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
 
Back
Top