can you attach a copy of your workbook? I'm not exactly sure about what you are talking about.
GComyn
can you attach a copy of your workbook? I'm not exactly sure about what you are talking about.
GComyn
I'm not sure what you are talking about.... could you attach a copy of your workbook so we can take a look at it?
GComyn
Hi gcomyn. Sorry for delay. I figured it out. What I had done was put a list in the cell that we would key the name. The list had the names of all the employees. But if I just deleted the name I guess "isempty" did not recognize it was truly empty. So I modified the code so that if target.value = "Hide Row" then run the hide row line. It works perfect now. Thank you so much for you help on this.
Hi there. This code you all helped me on is great and again I can't thank you enough. I need a minor edit though. If the cell above has a name in it can I get help with the line to goto the else statement? I want the user to have the cell below the name they just keyed available but can hide the cell 2 cells below. My thoughts were....
if (target.value -2) <> "" then
but I can't get it to work.
[vba]Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ERROR
If (Target.Column = 1) Then
If Target.Row + 2 < Range("a326").Row Then
If (Target.Value) = "" Then
Call MacroUprotectAll
Rows((Target.Row) & ":" & (Target.Row + 1)).EntireRow.Hidden = True
Else
Call MacroUprotectAll
Rows((Target.Row + 2) & ":" & (Target.Row + 3)).EntireRow.Hidden = False
End If
End If
End If
Target.Select
Call ProtectAll
ERROR:
End Sub[/vba]