I am trying provide the ability to hide and show slicers using a check box. And for some reason it not working? Not very good, no I am horrible in VBA, so the question may be a dumb one. Here is what I have:
Code:
Sub HideShowObjects() If ActiveSheet.Range("AF1").Value Then
ActiveSheet.Shapes("Region").Visible = True
ActiveSheet.Shapes("2014 Carryover").Visible = True
ActiveSheet.Shapes("Capitalized 2015 USD").Visible = True
ActiveSheet.Shapes("Sub Function 1").Visible = True
Else
ActiveSheet.Shapes("Region").Visible = False
ActiveSheet.Shapes("2014 Carryover").Visible = False
ActiveSheet.Shapes("Capitalized 2015 USD").Visible = False
ActiveSheet.Shapes("Sub Function 1").Visible = False
End If
End Sub