View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Marilyn Marilyn is offline
external usenet poster
 
Posts: 211
Default Create a simple input box


Thanks, Perfect
Is it possible to have the answer entered in a cell , that is if the answer
is 2 the number 2 appear in cell D5
thanks again

"Dave Peterson" wrote:

Option Explicit
Sub testme()

Dim myNum As Long
myNum = CLng(Application.InputBox(Prompt:="1, 2, 3, or 4", Type:=1))

If myNum < 1 _
Or myNum 4 Then
MsgBox "Please try again!"
Exit Sub
End If

'your code to do the work goes here
MsgBox myNum

End Sub

Marilyn wrote:

Hello How do I create input box asking the user to type in the term of
agreement
1, 2, 3, 0r 4 years
or where can I get instructions to do this. I have a book but the
instructions are not very clear to me. thanks


--

Dave Peterson