i have these worksheets used green text abbreviations request databases, complete name users only. thought idea use different color these comments can removed easily. i've managed take @ used cells in worksheets.
what want test on color of font.
on error resume next if cl.font.themecolor = xlthemecoloraccent3 cl.value = "" end if on error goto 0
edit:
i've tried this:
for each ws in wb.worksheets each cl in ws.range("a1:h10").cells on error goto nextiteration if cl.font.themecolor = xlthemecoloraccent3 cl.value = "" end if nextiteration: next next
but remove colored cell in range.
can explain me why ? can show me how select green cells (olive green, accent 3)
it due way have placed error handling code. when if cl.font.themecolor = xlthemecoloraccent3 then
throws exception, ignored , execution continues on next step.
attempting access theme color object color not themed result in invalid request run-time error.
use err.number
find out if error thrown.
----loop---- on error resume next if cl.font.themecolor = xlthemecoloraccent3 if err.number = 0 ' 0 if no error occurred in previous step cl.value = "" end if end if err.clear ' clear error state ----end loop----
Comments
Post a Comment