Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Create a simple input box
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 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Create a simple input box
myNum = Application.InputBox("C")
Press ALT-11 to open VBEditor, search for InputBox. The above will prompt the user with "Enter a number" and store the response in the variable myNum. "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 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Create a simple input box
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 |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Create a simple input box
Hi,
If you are in the spreadsheet, you might consider Data, Validation, List and enter 1 year, 2 years, 3 years, 4 years as the Source. Personally, I would enter the 1 year, 2 years,... in a range and reference the range in the Source box. Then click the second tab, Input Message and type a message to tell the user what you want them to do. -- Thanks, Shane Devenshire "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 |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Simple input/display question | Excel Discussion (Misc queries) | |||
Create a box where I can input data | Excel Worksheet Functions | |||
Excel 03 Trying to create input form | Excel Discussion (Misc queries) | |||
Can I create an input bar? | Excel Worksheet Functions | |||
How do I create a simple macro | Excel Discussion (Misc queries) |