Hello, I am trying to detect if there are any highlighted cells in an Excel sheet. If so, it will show a message that says “there are invalid inputs”. I managed to do so but the message shows up every time there is a red box. It is quite illogical to tell the user that the sheet has errors so many times. Is there a way to check across all rows, and all columns for highlighted cells, and once it finds the very first highlighted cell, it stops the process and informs the user about it?
Highlighted = False
For Each Row in DataTable
For Each cell in DataTable.columns
Use Get Cell color activity for current cell
If System.Drawings.Color.Red
Highlighted = True
Use Break activity
If Highlighted = True
Use Break activity
If Highlighted = True
Message Box: "There are invalid inputs"