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


Simple problem i know but i am hitting a blank with this one. I have a
macro that reads:

If Range("N57") = "" Then
Else

Before the Else i want a warning box in there instead ot the do nothing
that is currently in there. I just want it to read something like
"Please Enter a Value".

any takers?


--
chalky
------------------------------------------------------------------------
chalky's Profile: http://www.excelforum.com/member.php...o&userid=23758
View this thread: http://www.excelforum.com/showthread...hreadid=509435

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


Hello Chalky,

Try using an InputBox...

If Range("M57") = "" Then
Answer = InputBox("Please enter a value.")
If Answer < "" Then Range("M57") = Answer
Else
....
End If

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=509435

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Error Box

Do
If Range("N57") = "" Then
Range("N57").Value = Inputbox("Please Enter a Value")
Else
'...
End If
Loop Until Range("N57").Value < ""

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"chalky" wrote in
message ...

Simple problem i know but i am hitting a blank with this one. I have a
macro that reads:

If Range("N57") = "" Then
Else

Before the Else i want a warning box in there instead ot the do nothing
that is currently in there. I just want it to read something like
"Please Enter a Value".

any takers?


--
chalky
------------------------------------------------------------------------
chalky's Profile:

http://www.excelforum.com/member.php...o&userid=23758
View this thread: http://www.excelforum.com/showthread...hreadid=509435



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Error Box

If Range("N57") = "" Then
MsgBox "Please Enter Value"
exit sub
Else


An Alternative

Dim as as Variant
If Range("N57") = "" Then
ans = InputBox("Please Enter a Value for ""N57""")
if not isnumeric(ans) then
exit sub
else
Range("N57").Value = ans
end if
End if

--
Regards,
Tom Ogilvy


--
Regards,
Tom Ogilvy



"chalky" wrote in
message ...

Simple problem i know but i am hitting a blank with this one. I have a
macro that reads:

If Range("N57") = "" Then
Else

Before the Else i want a warning box in there instead ot the do nothing
that is currently in there. I just want it to read something like
"Please Enter a Value".

any takers?


--
chalky
------------------------------------------------------------------------
chalky's Profile:

http://www.excelforum.com/member.php...o&userid=23758
View this thread: http://www.excelforum.com/showthread...hreadid=509435



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
Counting instances of found text (Excel error? Or user error?) S Davis Excel Worksheet Functions 5 September 12th 06 04:52 PM
Form Err.Raise error not trapped by entry procedure error handler [email protected] Excel Programming 1 February 8th 06 10:19 AM
run-time error '1004': Application-defined or object-deifined error [email protected] Excel Programming 5 August 10th 05 09:39 PM
Automation Error, Unknown Error. Error value - 440 Neo[_2_] Excel Programming 0 May 29th 04 05:26 AM


All times are GMT +1. The time now is 03:07 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"