I'm trying to have my Excel spreadsheet delete out certain parts of the form based on values entered into it.
It works for the first instance, but then returns a 1004 error referring me to the macro that has already run, saying that the object no longer exists (because the macro has already run once and deleted it)
Below is a copy of my change event and macros (they are identical except for their names and which checkbox they delete)
Any help on this would be very much appreciated!
Private Sub Worksheet_Change(ByVal Target As Range)
If [IV12] = 1 Then
Call Macro1
End If
If [IV14] = 1 Then
Call Macro2
End If
If [IV16] = 1 Then
Call Macro3
End If
If [IV17] = 1 Then
Call Macro4
End If
If [IV20] = 1 Then
Call Macro5
End If
If [IV22] = 1 Then
Call Macro6
End If
If [IV25] = 1 Then
Call Macro7
End If
End Sub
------ Below is what the Macros look like -------
Sub Macro1()
ActiveSheet.Unprotect
ActiveSheet.Shapes.Range(Array("Check Box 55")).Select
Selection.Delete
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub()
Bookmarks