Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7441125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:57:42+00:00 2026-05-29T10:57:42+00:00

I am working on a Excel Spreadsheet that when a dropdown box value is

  • 0

I am working on a Excel Spreadsheet that when a dropdown box value is selected an image will pop up, and if another value is selected it will hide the current image and pop up the image related to the selection. I have found a few methods that are just too time consuming using just the sheet and positioning of the image using coordinates; that’s not exactly the route I would like to go.I have done a quite a bit of research before using StackOverflow, and nothing seemed to work thus far. Below is what I am trying to achieve. I am trying to keep all the images within the spreadsheet which adds another level of challenge, but I believe there is a way to do this because excel assigns the image a number when inserted EX. Picture 9.

Sub Main()
   If Range(G11).Value = "anything" Then

   Picture1 show

   Picture2 hide

   End If
End Sub

Any Help is greatly appreciated. Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T10:57:42+00:00Added an answer on May 29, 2026 at 10:57 am

    Rather than hiding/moving/reducing the size of the unwanted pic, why not simply delete it?

    Logic:
    Save all your images in a temp sheet. When ever a relevant picture is supposed to be shown, get it from the temp sheet and delete the previous.

    Here is an example.

    Sub Sample()
        Select Case Range("G11").Value
            Case "Picture 1": ShowPicture ("Picture 1")
            Case "Picture 2": ShowPicture ("Picture 2")
            Case "Picture 3": ShowPicture ("Picture 3")
            Case "Picture 4": ShowPicture ("Picture 4")
        End Select
    End Sub
    
    Sub ShowPicture(picname As String)
        '~~> The reason why I am using OERN is because it is much simpler
        '~~> than looping all shapes and then deleting them. There could be
        '~~> charts, command buttons and other shapes. I will have to write
        '~~> extra validation code so that those shapes are not deleted.
        On Error Resume Next
        Sheets("Sheet1").Shapes("Picture 1").Delete
        Sheets("Sheet1").Shapes("Picture 2").Delete
        Sheets("Sheet1").Shapes("Picture 3").Delete
        Sheets("Sheet1").Shapes("Picture 4").Delete
        On Error GoTo 0
    
        Sheets("Temp").Shapes(picname).Copy
    
        '<~~ Alternative to the below line. You may re-position the image 
        '<~~ after you paste as per your requirement
        Sheets("Sheet1").Range("G15").Select 
    
        Sheets("Sheet1").Paste
    End Sub
    

    Snapshot of temp sheet

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been working intermittently on an Excel spreadsheet for a customer that does some
I'm working on a function in Excel that will allow me to sum columns
I'm working on some code that generates an Excel spreadsheet server-side and then downloads
I'm working on a vb.net application which imports from an Excel spreadsheet. If rdr.HasRows
I am trying to start working with Excel documents through the OpenXML SDK Spreadsheet
I am working on an Excel application that queries a SQL database. The queries
I have an excel spreadsheet that has 2 columns. Something like this |ColA |
I'm writing an application that pulls values out of an Excel spreadsheet and then
All, I'm working on an application that allows authorized users to upload Excel spreadsheets
I am working on a complex spreadsheet based solution. Occasionally a user will experience

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.