excel - Put a fill color in a specific cell -
my program loops through each row of data in sheet. when errors, want put fill color on specific cell.
is there way put fill color in cell without using range?
on error goto stop 'doing exit sub stop: msgbox("error!") 'something fill cell sheets("data").cells(rowdata,1).color = red
you can this
cells(rowindex, columnindex).interior.color = rgb-code cells(rowindex, columnindex).interior.colorindex = indexno
Comments
Post a Comment