I have a similar question as lbaca. I also like to run a different macro based on the value in a cell in a column.
ie A. In this column can be different numbers and based on witch number it is i would like to run a specific macro.
I know how to make a button and connect it to the macro to run. Only the macro i create isn't working.
I have a Import and a Main sheet
=================================
In the "import" sheet i can see this:
Private Sub Worksheet_Change(ByVal Target As Range)
End Sub
------------------------------------------------------
I put this code in my module:
Sub Import()
If Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub
If Target.Value = "0" Then Call MacroA
If Target.Value = "1" Then Call MacroB
If Target.Value = "2" Then Call MacroC
If Target.Value = "3" Then Call MacroD
If Target.Value = "4" Then Call MacroE
End With
End Sub
When i run the macro, i receive a error: Missing object in this line; If Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub
Also when i click this line it say's ; Target is empty
What am i doing wrong?