+ Reply to Thread
Results 1 to 2 of 2

Making VBA Macro to make shapes disappear if cell has certain value (Multiple Shapes)

  1. #1
    Registered User
    Join Date
    03-05-2019
    Location
    USA
    MS-Off Ver
    MS office 2013
    Posts
    4

    Making VBA Macro to make shapes disappear if cell has certain value (Multiple Shapes)

    So I have this formula that is currently working for a single image

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Row = 1 And Target.Column = 1 Then _
    Me.Shapes("Group 1").Visible = (Cells(1, 1).Value = 1)
    End Sub
    This is exactly what I need! The issue is, I have around 500-1000 images that I'm going to have to put on this document, is there an easy formula to put in here to get the wide range of images I named? They will be named Group 1-1000.

    Also, I think I may have to have the numbers that decide if the image should be shown or not behind a formula. Would I have to use the Worksheet_Calculate function instead? And if so, what would that formula look like?

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Making VBA Macro to make shapes disappear if cell has certain value (Multiple Shapes)

    HI, I would suggest you name the schape accordint to the range address it applies to.
    so if the like cell 1 1 that will be A1, name the shape
    Please Login or Register  to view this content.
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Shapes disappear when macro is run
    By BarneyRub in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-03-2019, 12:39 PM
  2. Replies: 5
    Last Post: 08-11-2017, 03:05 PM
  3. excel 2013 customize context shapes and shapes group menu right click
    By Giuseppe77 in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 12-03-2016, 11:50 AM
  4. Exporting as PDF causing Shapes and Controls to disappear from sheet
    By VBA FTW in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-15-2014, 06:49 PM
  5. Shapes based on Cell Data, Golf Score card data that shows shapes around scores
    By BiggDC1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-12-2012, 12:42 PM
  6. How To Move Shapes From Another Shapes? (floating shapes)
    By MarcLev in forum Word Programming / VBA / Macros
    Replies: 2
    Last Post: 10-04-2009, 04:04 PM
  7. Shapes disappear from Excel 2000 to 2003?
    By Cheer in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-01-2005, 03:06 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1