Results 1 to 1 of 1

Thread: Clicking slicers is hiding shapes, how to solve?

  1. #1
    Seeker thousand's Avatar
    Join Date
    Apr 2017
    Posts
    17
    Articles
    0
    Excel Version
    2010

    Clicking slicers is hiding shapes, how to solve?



    Register for a FREE account, and/
    or Log in to avoid these ads!

    I have a workbook with slicers and shapes, the below works perfectly to hide and unhide the shapes

    However, when the slicer is clicked it will also trigger the macro (hide and unhide shapes) is there any clever way to solve this?

    Thanks


    Code:
    Sub instructions()
    Dim obj As Shape
    Set obj = ActiveSheet.Shapes("Oval callout 1")
    If obj.Visible Then
        obj.Visible = False
    Else
        obj.Visible = True
    End If
    End Sub
    Last edited by AliGW; 2018-08-10 at 08:38 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •