+ Reply to Thread
Results 1 to 3 of 3

Making an image visible/ invisible as cell selection changes

  1. #1
    Valued Forum Contributor
    Join Date
    08-31-2007
    Location
    SW Ireland
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2311 Build 16.0.17029.20068) 32-bit
    Posts
    523

    Making an image visible/ invisible as cell selection changes

    Hi,

    [See attached file]

    I am trying to make a 'Help button' image visible or invisible as the user selects cells for which help is available.

    I am using the following logic to do so:

    1. The cells for which help is available are named ranges e.g. a cell might be named GrossPay.
    2. The associated Help image is named'hlp[NamedRange] e.g. the Help image for the above named range would be hlpGrossPay.
    3. I am using the sheet's Selection_Change procedure to toggle the visibility state of the Help image as detailed below:

    Please Login or Register  to view this content.
    The code works fine when I click on any of the relevant named range cells (i.e. for which there is an associated Help image) but when I click on any cell without an associated Help image, the last displayed Help image remains displayed- this is the problem I am trying to fix! I want all of the Help images to be made invisible if the cell on which I click does not have an associated Help image. I've tried a few variations at fixing it but haven't got it yet.

    All replies gratefully appreciated.
    Attached Files Attached Files
    Last edited by deadlyduck; 03-08-2011 at 08:47 AM.
    Excel 365 user. To unblock a downloaded macro-enabled workbook, go to your "Downloads" folder > right click on the workbook name > click 'Properties' > check the 'Unblock' checkbox. You can now open the workbook.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Making an image visible/ invisible as cell selection changes

    Hello deadlyduck,

    This worked for me. Try it out for yourself.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Valued Forum Contributor
    Join Date
    08-31-2007
    Location
    SW Ireland
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2311 Build 16.0.17029.20068) 32-bit
    Posts
    523

    Re: Making an image visible/ invisible as cell selection changes

    Hi Leith,

    Many thanks (yet again) - I will check this out later today and mark it as solved once confirmed it's good!

    Brian

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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