activesheet.tab.colorindex not working when workbook shared

M

Martin Appleton

I have a workbook with the following code operating correctly in
exclusive access. However, this code fails with an error 1004 when the
workbook is put into shared mode. This will fail for a single cell
named as "PassFail"

Any thoughts?

For Each C In Range("PassFail")
If C.Value = "Fail" Then
ActiveSheet.Tab.ColorIndex = 3
ElseIf C.Value = "Pass" Then
ActiveSheet.Tab.ColorIndex = 4
End If
Next c
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top