#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default InputBox

Dear friends,
I want to check whether the entry in an inputbox is not error, nothin
or zero
I tried the following code but did not work.
Do you have any suggestions?
Thanks,
G

x = InputBox("Enter value of " & Range("B1").Value & ".", "GNB")

' Invalid entry
If IsError(x) Or IsEmpty(x) Or IsNull(x) Then
MsgBox ("Invalid Entry!")
x = InputBox("Enter Value of" & Range("B1").Value & "."
"GNB")
Print #1, "Value Entered for "; Range("B1").Value; " is "; x
End I

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default InputBox

Well, I can't imagine how a person will enter an error in the input box
but for the other two things (i.e. empty and zero) you can use th
following:

If (x = 0 Or x = "") Then

- Manges

--
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
InputBox peyman Excel Discussion (Misc queries) 4 September 28th 07 04:53 PM
InputBox GeorgeJ Excel Discussion (Misc queries) 5 July 12th 07 01:20 AM
inputbox brownti via OfficeKB.com Excel Discussion (Misc queries) 2 February 9th 07 02:37 PM
Inputbox with VBA Jeff Excel Discussion (Misc queries) 3 January 19th 06 05:18 PM
InputBox Hargrove Excel Programming 2 April 29th 04 07:43 PM


All times are GMT +1. The time now is 06:27 AM.

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

About Us

"It's about Microsoft Excel"