Excelguruintraining
New Member
- Joined
- Apr 23, 2015
- Messages
- 24
Hello all I hope all is well. I have the code below to help me go to certain sheets in my workbook if the cell contains the same text as the worksheet. As i complete work in a specific sheet i will turn it RED, Yellow, or Green. I was wondering if someone could help me add to this code so that if i turn the cell one color the sheet tab will be the same color. Any help is greatly appreciated!!!
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)If Intersect(Target, Range("B:B")) Is Nothing Then Exit Sub
v = Target.Value
For Each sh In Worksheets
If sh.Name = v Then
Cancel = True
sh.Activate
End If
Next
End Sub