I would ask to your help, Im tryng to stop the code if the value in cell target is equals target value, but when i try to writ in some part of the sheet VBA send me a debug message.
My target is:
If target cell contains target value then run the code. (and it does but when i populate any valu in any cell VBA send me an Debug msbox)
Somebody could help me please.
Code in sheet 1
Private Sub Worksheet_Change(ByVal Target As Range)
Set Target = Range("A1")
If Target.Value = "X" Then
Call Desagrupar
Exit Sub
End If
End Sub
Macro un Module 1
Sub Desagrupar()
' Muestra el detalle de los rangos seleccionados
Rows(9).ShowDetail = True
Rows(20).ShowDetail = True
End Sub
Bookmarks