ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   activesheet.tab.colorindex not working when workbook shared (https://www.excelbanter.com/excel-discussion-misc-queries/100512-activesheet-tab-colorindex-not-working-when-workbook-shared.html)

Martin Appleton

activesheet.tab.colorindex not working when workbook shared
 
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


All times are GMT +1. The time now is 12:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com