Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Encountered another Check Cell Problem


Hello Again,

Maybe I should have stated earlier that I'm actually checking 5 groups
of 2 cells (if that makes since). The code should check A1 & B1, then
A2 & B2, A3 & B3...

What happens is that if A1 has data, but B1 doesn't. The code returns
the 1st error message as expected, butwhen the ok button is pushed on
the 1st message it goes to the next successful message, which I don't
want it to do until all cell conditions are true.

Here's the code for just 2 of the 5 groups needed:

Sub Check_click()

If Range("A1").Value < "" And Range("B1").Value = "" Then
MsgBox "You must select a code in Special Purpose Deposits. Click
the arrow to select General or Building!", 16, "message"
Range("B1").Select
End If

If Range("A2").Value < "" And Range("B2").Value = "" Then
MsgBox "You must select a code in Special Purpose Deposits. Click
the arrow to select General or Building!", 16, "message"
Range("B2").Select

Else
MsgBox "Check Sheet is Successful. Go to step 5!", 64, "message"
End If

End Sub

Thanks Again,
EMoe


--
EMoe
------------------------------------------------------------------------
EMoe's Profile: http://www.excelforum.com/member.php...o&userid=23183
View this thread: http://www.excelforum.com/showthread...hreadid=374563

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
Microsoft Excel has encountered a problem suehoege Excel Discussion (Misc queries) 1 December 30th 09 03:06 PM
Microsoft Excel has encountered a problem suehoege[_2_] New Users to Excel 0 December 30th 09 10:06 AM
Microsoft Excel has encountered a problem... Frank Excel Discussion (Misc queries) 4 April 27th 09 04:13 PM
Problem encountered Pat Setting up and Configuration of Excel 1 March 3rd 06 03:01 PM
Encountered another Check Cell Problem anilsolipuram[_27_] Excel Programming 0 May 27th 05 04:51 PM


All times are GMT +1. The time now is 10:05 PM.

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"