Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Microsoft Excel has encountered a problem | Excel Discussion (Misc queries) | |||
Microsoft Excel has encountered a problem | New Users to Excel | |||
Microsoft Excel has encountered a problem... | Excel Discussion (Misc queries) | |||
Problem encountered | Setting up and Configuration of Excel | |||
Encountered another Check Cell Problem | Excel Programming |