This is my code for a simple test that the macro will only run on a specific imported file. The constants in the files that will be transformed are the cell colors in Cells A7 to C8, with row 7 Blue and row 8 yellow.
I have tried several variations of testing for the cell colors, but keep on getting a syntax error on line 1. here is the code that I feel is the most concise:
Sub Macro1()
If Interior.Color(A7:C7) <> RGB(93, 203, 253) Or Interior.Color(A8:C8) <> RGB(254,254,184) Then
MsgBox "This procedure is for the xxxxxI file only. This does not seem to be the correct report"
Exit Sub
End If
MsgBox "This is the correct report"
End Sub
Any help on where I am going wrong would be appreciated.
I have tried several variations of testing for the cell colors, but keep on getting a syntax error on line 1. here is the code that I feel is the most concise:
Sub Macro1()
If Interior.Color(A7:C7) <> RGB(93, 203, 253) Or Interior.Color(A8:C8) <> RGB(254,254,184) Then
MsgBox "This procedure is for the xxxxxI file only. This does not seem to be the correct report"
Exit Sub
End If
MsgBox "This is the correct report"
End Sub
Any help on where I am going wrong would be appreciated.