| 'This code is useful for when Excel pops up something private and you don't want others to see it 'The data to hide needs to be grouped Private Sub Worksheet_SelectionChange(ByVal Target as Range) On Error Resume Next If Target.Column = 12 then Columns("A:A").ShowDetail = True Range("B" & Target.Row).Select Elseif Target.Column = 1 Then Columns("A:A").ShowDetail = False End if 'Don't do Target.Select or will cause infinite loop End Sub |