I am running a simple code in a template sheet off an ActiveX check box. The template sheet is used as a Copy All and Paste All when a new sheet is created. How do I get the ActiveX control and associated code to go with the template when the new sheet is created?
#Private Sub CheckBox2_Click()
Dim DescriptionCell As Range
Set DescriptionCell = ActiveSheet.Range("C:AP")
If CheckBox2.Value = True Then
DescriptionCell.EntireColumn.Hidden = True
ActiveSheet.Range("$BC$1:$BC$349").AutoFilter Field:=1, Criteria1:="P"
Else
DescriptionCell.EntireColumn.Hidden = False
ActiveSheet.Range("$BC$1:$BC$349").AutoFilter Field:=1
End If
End Sub#
Bookmarks