CJG19
New Member
- Joined
- Jul 12, 2021
- Messages
- 40
- Office Version
- 2010
- Platform
- Windows
Good Morning All,
I am trying to set up a loop conditional formatting with a pop up message, but something isn't working, can anyone help please?
If BO equals 0, BK is greater than 0 and BL says No then I want the cell in BL to turn red and a pop up massage to question 'Have we received final account certificate?' Once turned to yes it carries on to the next cell continues to the bottom of the table then goes back to the beginning. I have the following and I am unsure where I am going wrong:
Sub Final_Account_Cert()
'Remove cell fill colour
With Range("BK5:B100").Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("BL5").Select
'Begin the loop
Do Until ActiveCell.Value = ""
If ActiveCell.Value = No And ActiveCell.Offset(0, -1) > 0 And ActiveCell.Offset(0, 3) = 0 Then
'Display a message to the user
MsgBox "Have We Received Final Account Certificate?", vbInformation, "Invoice Detail"
'Format Invoice Code Cell to Red
ActiveCell.Interior.Color = 255
End If
ActiveCell.Offset(1, 0).Select
Loop
End Sub
I would appreciate any help!
TIA!
CJG19
I am trying to set up a loop conditional formatting with a pop up message, but something isn't working, can anyone help please?
If BO equals 0, BK is greater than 0 and BL says No then I want the cell in BL to turn red and a pop up massage to question 'Have we received final account certificate?' Once turned to yes it carries on to the next cell continues to the bottom of the table then goes back to the beginning. I have the following and I am unsure where I am going wrong:
Sub Final_Account_Cert()
'Remove cell fill colour
With Range("BK5:B100").Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("BL5").Select
'Begin the loop
Do Until ActiveCell.Value = ""
If ActiveCell.Value = No And ActiveCell.Offset(0, -1) > 0 And ActiveCell.Offset(0, 3) = 0 Then
'Display a message to the user
MsgBox "Have We Received Final Account Certificate?", vbInformation, "Invoice Detail"
'Format Invoice Code Cell to Red
ActiveCell.Interior.Color = 255
End If
ActiveCell.Offset(1, 0).Select
Loop
End Sub
I would appreciate any help!
TIA!
CJG19