Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Apply conditions on Input box continuation!

Hi all!

Thanks for the tips.
Well I tried them but here'z the problem.

I tried the following with the intention of letting the user type i
ONLY numeric values as the Input.
==============================================
Sub MF ()
MyNum = InputBox("Enter the area multiplication factor")

If Not IsNumeric(MyNum) Then
MsgBox "Invalid Entry! The multiplication factor entered is not
numeric. "

Exit Sub

endif

end sub
==============================================


But when the 'Cancel' or 'OK' button are hit, Excel thinks those ar
non-numeric too and displays the very same message above and it simpl
exits of the loop.

I dont want the program to display " Invalid Entry! The multiplicatio
factor entered is not numeric. " when the 'Cancel' or 'OK' button ar
hit. It should simply exit the loop without displaying any message.

Is there a way we can do this?

Thanks again guys.

Regds,
Arun....

Vtec Corp.

p.s:
====
I did try the other options like the following:

mynum = Application.InputBox _
("Enter the area multiplication factor", Type:=1)

Still the same thing.....

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Apply conditions on Input box continuation!

Sub MF ()
MyNum = InputBox("Enter the area multiplication factor")
if MyNum = "" then exit sub
If Not IsNumeric(MyNum) Then
MsgBox "Invalid Entry! The multiplication factor entered is not numeric. "

Exit Sub

endif

--
Regards,
Tom Ogilvy

"aiyer " wrote in message
...
Hi all!

Thanks for the tips.
Well I tried them but here'z the problem.

I tried the following with the intention of letting the user type in
ONLY numeric values as the Input.
==============================================
Sub MF ()
MyNum = InputBox("Enter the area multiplication factor")

If Not IsNumeric(MyNum) Then
MsgBox "Invalid Entry! The multiplication factor entered is not
numeric. "

Exit Sub

endif

end sub
==============================================


But when the 'Cancel' or 'OK' button are hit, Excel thinks those are
non-numeric too and displays the very same message above and it simply
exits of the loop.

I dont want the program to display " Invalid Entry! The multiplication
factor entered is not numeric. " when the 'Cancel' or 'OK' button are
hit. It should simply exit the loop without displaying any message.

Is there a way we can do this?

Thanks again guys.

Regds,
Arun....

Vtec Corp.

p.s:
====
I did try the other options like the following:

mynum = Application.InputBox _
("Enter the area multiplication factor", Type:=1)

Still the same thing......


---
Message posted from http://www.ExcelForum.com/



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How many conditions can I apply to a cell? I need to apply 8. Markus Excel Discussion (Misc queries) 2 July 10th 08 01:06 PM
Adding today's date if certain conditions apply Daniel Lapin Excel Worksheet Functions 1 January 29th 07 06:52 PM
Summing if several conditions apply [email protected] Excel Worksheet Functions 3 December 1st 05 04:52 PM
How to apply conditions on Input box? aiyer[_54_] Excel Programming 4 August 31st 04 01:47 AM
cell = null if conditions apply Weng-Kit Tan Excel Programming 0 May 12th 04 05:48 PM


All times are GMT +1. The time now is 02:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"