Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
window to enter a number
Hello, again an easy one.
Instead of having this code ActiveCell.FormulaR1C1 = "2" (that enters 2 in a cell) how to I have a box (ie window ) pop up that askes me each time which number to enter? thank you. Steven. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
window to enter a number
Use an Inputbox
"steven" wrote: Hello, again an easy one. Instead of having this code ActiveCell.FormulaR1C1 = "2" (that enters 2 in a cell) how to I have a box (ie window ) pop up that askes me each time which number to enter? thank you. Steven. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
window to enter a number
Steven,
Use Application.InputBox. E.g., Dim V As Variant V = Application.InputBox(prompt:="Enter a number.", Type:=1) If V = False Then Debug.Print "User clicked cancel" Else ActiveCell.Value = V End If Note that you must use Application.InputBox instead of just InputBox in order to restrict the valid values to numbers (type:=1). -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (email address is on the web site) "steven" wrote in message ... Hello, again an easy one. Instead of having this code ActiveCell.FormulaR1C1 = "2" (that enters 2 in a cell) how to I have a box (ie window ) pop up that askes me each time which number to enter? thank you. Steven. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
HO do I enter a number and have it always appear negative | Excel Discussion (Misc queries) | |||
enter a number if equal to another number | Excel Discussion (Misc queries) | |||
Why am I getting ### when I enter an accting number and hit enter | New Users to Excel | |||
The window opens in a smaller window not full sized window. | Excel Discussion (Misc queries) | |||
How do I enter formula using % > or < = number? | Excel Worksheet Functions |