+ Reply to Thread
Results 1 to 9 of 9

MouseOver cell that makes apear and disappear an image

  1. #1
    Registered User
    Join Date
    12-15-2009
    Location
    Lx, Pt
    MS-Off Ver
    Excel 2003
    Posts
    3

    Talking MouseOver cell that makes apear and disappear an image

    Hello,
    Please Help

    I would like to do a routine in VBA on excel 2007 that makes the following:
    1- When the mouse is over a cell it pops-up a window that shows a picture;
    2- When the pointer is removed from the cell the window that contains the picture closes;
    It is very important that the picture that is shown be adressed by a relative path from the folder in which is the excel file.
    The pictures can change; this is the reason that the picture should be addressed by a path.

    Thanks a lot
    Last edited by first_mo_za; 12-17-2009 at 09:24 PM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480

    Re: MouseOver cell that makes apear and disappear an image

    Is the path address in the cell?

  3. #3
    Registered User
    Join Date
    12-15-2009
    Location
    Lx, Pt
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: MouseOver cell that makes apear and disappear an image

    Dave,

    The "address" is the same folder in which the excel is.
    Thkx

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480

    Re: MouseOver cell that makes apear and disappear an image

    This code will find the .jpg in the active workbook folder and place the address into cell G1.
    It will then add a comment into A1 and use the address in G1 as the source.
    Please Login or Register  to view this content.

  5. #5
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: MouseOver cell that makes apear and disappear an image

    Just quoting here, but a similar topic came up yesterday in another thread

    Quote Originally Posted by Andy Pope View Post
    There are no mouse movement events for a workbook.

    Activex controls on the worksheet have mouse events as do controls on a userform.
    Edit: Scratch that then, comments are obviously the exeption. Nice!

  6. #6
    Registered User
    Join Date
    12-15-2009
    Location
    Lx, Pt
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: MouseOver cell that makes apear and disappear an image

    Dave,

    Sorry. It gives me an error "run-time error 445" at the linecode "With Application.FileSearch"

    Thkx

    EDIT: Thkx Dave. I've solved the issue. I realized that Application.Filesearch is no longer available in excel 2007. I got it to work with this from Roy's blog http://excel2007tips.blogspot.com/20...h-in-2007.html

    Thank you
    Last edited by first_mo_za; 12-16-2009 at 02:02 PM.

  7. #7
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480

    Re: MouseOver cell that makes apear and disappear an image

    I did not know that, I had just assumed that XL'07 could run XL'03 VBA, thanks for the link.

    Could you supply the code so people with XL'07 can use it.


    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  8. #8
    Registered User
    Join Date
    06-19-2012
    Location
    Rio
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: MouseOver cell that makes apear and disappear an image

    Hi mates, sorry for ressurection this topic but i need the same solution.

    I couldnt get it to work in Excel 2012 with the code provided, and couldnt adapt it myself using first_mo_za tip.

    Anyone can help me ?

  9. #9
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: MouseOver cell that makes apear and disappear an image

    Blakito,

    Welcome to the Forum, unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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