View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default How to apply conditions on Input box?

Try

If Mynum = "" Or Not IsNumeric(Mynum) Then

take action here

Gord Dibben Excel MVP

On Mon, 30 Aug 2004 18:51:39 -0500, 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/