Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can make the user enter a number using application.inputbox with type:=1.
And you can check for a "cancel" this way: Option Explicit Sub testme01() Dim myNum As Variant myNum = Application.InputBox _ ("Enter the area multiplication factor", Type:=1) If myNum = False Then 'user cancelled Else MsgBox myNum End If End Sub "aiyer <" wrote: Hi all! An input boxprompts the user to specify a numeric value for a certain variable "mynum", as follows. The user CANNOT type in gibberish/characters. It has to be only numbers -ve.0. + ve numbers only are acceptable. ============================================== mynum = InputBox("Enter the area multiplication factor") If mynum = " " Then Exit Sub End If ============================================== But the above logic accepts characer inputs/gibberish as well. Look forward to your helps guys. Thanks alot, Arun... Vtec. Corp. --- Message posted from http://www.ExcelForum.com/ -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2003 count if multple conditions apply | Excel Worksheet Functions | |||
How many conditions can I apply to a cell? I need to apply 8. | Excel Discussion (Misc queries) | |||
Adding today's date if certain conditions apply | Excel Worksheet Functions | |||
Summing if several conditions apply | Excel Worksheet Functions | |||
cell = null if conditions apply | Excel Programming |