Searching for Boolean Cells
Hi,
I'm using the following statement to set an object equal to the boolean
cells in a worksheet. After that I can colour them to identify their
location. However if there are no such cells in the worksheet an error is
generated. I could use resume next and clear the errors but a neater way
would obviously be a test for the existence of boolean cells before the
colouring loop is entered
dim cellcollection as object
Set cellCollection = Selection.SpecialCells(xlCellTypeConstants, xlLogical)
For Each cell In cellCollection
ActiveSheet.Cells(cell.Row, cell.Column).Interior.ColorIndex =
booleanColour
Next cell
Suggestions...Thanks Chris
|