+ Reply to Thread
Results 1 to 11 of 11

Hide/show shape on Sheet1 based on cell value in Sheet2?

  1. #1
    Registered User
    Join Date
    08-07-2013
    Location
    SWE
    MS-Off Ver
    Excel 2011
    Posts
    15

    Hide/show shape on Sheet1 based on cell value in Sheet2?

    Hi!

    I manage to do what my title says with a VLOOKUP and VBA code for pictures. But this code only leets me view one picture at time. Therefore i´m looking for the same kind of solution for this shape. Any of you guys have any idea?

    Thanks!! Guple

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Hide/show shape on Sheet1 based on cell value in Sheet2?

    can you attach a sample file with notes ?
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    08-07-2013
    Location
    SWE
    MS-Off Ver
    Excel 2011
    Posts
    15

    Re: Hide/show shape on Sheet1 based on cell value in Sheet2?

    Below is CODE 1 which lets me choose which picture i want to show on sheet2 FROM SHEET1 (with VLOOKUP). This works great. But cannot be used with this specific action as it only lets ONE picture to be shown at a time. Therefore i´m looking for another macro to let me show/hide this specific shape "rectangle 1" on sheet2 from entering a specific value on SHEET1.

    CODE 2 works like a charm with SHEET2 activated. But when SHEET1 is active and i enter the specific value in a cell (which is linked to D1 in SHEET2 (See code2)) the macro wont automatically update until i select sheet2 and run the macro in the VBA window.

    Sorry for bad explanation, please ask if something is unclear!!

    Thanks for your reply.

    // Guple



    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by arlu1201; 10-22-2013 at 09:31 AM.

  4. #4
    Registered User
    Join Date
    08-07-2013
    Location
    SWE
    MS-Off Ver
    Excel 2011
    Posts
    15

    Re: Hide/show shape on Sheet1 based on cell value in Sheet2?

    Anyone Please?

  5. #5
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Hide/show shape on Sheet1 based on cell value in Sheet2?

    I asked for file, not only code

  6. #6
    Registered User
    Join Date
    08-07-2013
    Location
    SWE
    MS-Off Ver
    Excel 2011
    Posts
    15

    Re: Hide/show shape on Sheet1 based on cell value in Sheet2?

    I removed the file!
    Last edited by Guple; 11-14-2013 at 01:33 PM.

  7. #7
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Hide/show shape on Sheet1 based on cell value in Sheet2?

    I'm sorry but I did not understand anything about your workbook, your code and your goal

  8. #8
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Hide/show shape on Sheet1 based on cell value in Sheet2?

    Hi, Guple,

    there is a formula in A5!H1. The event you have chosen to work will only get triggered once an entry is made into the cell it is monitoring but not if the value changes due to a formula.

    I would suggest to work with Data/Validation for the input in start Range C3 in order to avoid typos.

    Code could be reduced to
    Please Login or Register  to view this content.
    behind the sheet A5.

    @patel45:
    I asked for file, not only code
    Sounds quite harsh to me - especially since you weren´t able to provide any hint/help.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  9. #9
    Registered User
    Join Date
    08-07-2013
    Location
    SWE
    MS-Off Ver
    Excel 2011
    Posts
    15

    Re: Hide/show shape on Sheet1 based on cell value in Sheet2?

    Thanks for your help!!

    I´ve added the data validation to start sheet c3 for a drop down list. This works great. THANKS!!



    The code below also works great, but it does not make the shape hide/show until i manually go in to vba and manually run the code. Can i make excel to do this for me?

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    08-07-2013
    Location
    SWE
    MS-Off Ver
    Excel 2011
    Posts
    15

    Re: Hide/show shape on Sheet1 based on cell value in Sheet2?

    I was just kidding!!! Everything works great!! Thanks for your help!! AWESOME

  11. #11
    Registered User
    Join Date
    08-07-2013
    Location
    SWE
    MS-Off Ver
    Excel 2011
    Posts
    15

    Re: Hide/show shape on Sheet1 based on cell value in Sheet2?

    I´m very thankful to all your help!! But i wonder if there is any way that i could use a drop down list instead of buttons?

    My macro looks like this below, and can hide/show two different shapes linked to Cell "D17" and "D18". When Cell "D18" is true then shape99 appears, and when Cell "D17" is TRUE then shape100 appears. But as i want to add more shapes, and NOT more Buttoms, i´m interesting in a solution were i can use a drop down list. So for example when Cell "C20" have Value "shape1" then shape 1 appears, and when "C20" has value shape99 then shape100 appears.

    Any ideas? I´m very thankful for your help!!!

    Please Login or Register  to view this content.

    Root: https://www.dropbox.com/s/8cwxgh6c8284e0l/program.xlsm
    Last edited by Guple; 12-05-2013 at 11:17 AM.

  12. #12
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Hide/show shape on Sheet1 based on cell value in Sheet2?

    Hi, Guple,

    did you mean Buttons or Checkboxes?

    Maybe like this:
    Please Login or Register  to view this content.
    Ciao,
    Holger

+ 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. how to show record from sheet2 to sheet1 based on selection of combo box
    By mike018 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-15-2013, 02:30 AM
  2. Macro to copy range of cell from sheet1 to sheet2 based on a cell value in sheet2
    By drgwhizz in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-25-2012, 10:39 AM
  3. How to copy a range of columns from sheet1 to sheet2 if the cell show a specific text
    By chermaine123 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-21-2011, 02:39 AM
  4. Hide columns on sheet2 based on cell on sheet1?
    By proepert in forum Excel General
    Replies: 4
    Last Post: 01-25-2010, 09:00 AM
  5. [SOLVED] can i type sheet1 A5 and make it show Sheet2 A6 cell
    By HelpMe in forum Excel General
    Replies: 1
    Last Post: 02-24-2005, 10:06 PM

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