Hello,
I have a script, that should be working on any sheet, since I have it in the workbook area.
What it is supposed to do is, when I type the word done, in a field on any of the group worksheets (group1, group2 or group3), it automatically hides that row in that sheet, as well as that row in the overview sheet. The overview sheet, is a sheet that contains a paste link of each row from any of the 3 additional sheets. If I go to the group1 sheet and type the word done in any row, it hides that row in that sheet and the overview sheet, no problem. But, if I do the same thing in group2 or group3 sheet, the row itself hides in that sheet, but not in the overview sheet????
Can someone look at this code and tell me what is wrong?
I have also attached my file so you can see what I am trying to achieve.
thanks so much!!
babs
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim x%
If Target.Count > 1 Then Exit Sub
If Target.Address = "$A$1" Then GoTo search 'Change $A$1 to whichever cell reference you want
If UCase(Target.Value) = "DONE" Then
Rows(Target.Row).Hidden = True
Sheets("Overview").Rows(Target.Row).Hidden = True
On Error Resume Next
Sheets("Overview").Rows(Target.Row).Hidden = True
End If
Exit Sub
search:
On Error Resume Next
If UCase(Target.Value) = "DONE" Then Exit Sub
x = Cells.Find(What:=Target.Value, After:=Cells(1, 1), LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False).Row
If Cells(x, 1).EntireRow.Hidden = True Then
Cells(x, 1).EntireRow.Hidden = False
Rows(x & ":" & x).Replace What:="DONE", Replacement:="un-done", LookAt:=xlWhole, SearchOrder:=xlByRows, MatchCase:=False
End If
End Sub
Bookmarks