+ Reply to Thread
Results 1 to 4 of 4

Mouse Over CommandButton Does not Display Picture

  1. #1
    Registered User
    Join Date
    11-22-2013
    Location
    USA
    MS-Off Ver
    2003, 2007, 2010, Office 365
    Posts
    31

    Question Mouse Over CommandButton Does not Display Picture

    I have an Excel chart for which I am tracking 5 items YTD. These 5 items have a 4 digit numerical code and explanation such as: "1234 - Object is the wrong color." To eliminate confusion on the chart, I have removed the explanation and track these items by code number only so they now are 1234, 1567, 2876, etc..

    I have been attempting to create a "Mouseover CommandButton" to display a picture or text pop-up that will allow the users to see the whole code and explanation. This information should be displayed when the mouse pointer is moved over the CommandButton, and disappear when the mouse is moved from the button. After having created Label1, Here is the VBA code I am attempting to use:
    Please Login or Register  to view this content.
    First trial resulted in my "CommandButton1" turning Grey on mouse over, and Blue on mouse off, and, no picture is displayed. I am not interested in my command button changing colors.

    So I entered a path to the picture:
    Image1.Picture = stdole.LoadPicture("C:\Documents\My Pictures\Image 5.jpg")

    The result of this trial produces Run-time error '76' Path not found and brings up the Debug with Image1.Picture = stdole.LoadPicture("C:\Documents\My Pictures\Image 5.jpg") highlighted yellow.
    I have tried numerous variations and reiterations without success. Worksheets attached.

    Please point out where I am missing the mark.
    Thank you in advance.
    Attached Files Attached Files
    Last edited by Leith Ross; 02-22-2018 at 11:02 PM. Reason: Added Code Tags

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Mouse Over CommandButton Does not Display Picture

    Are you sure that path is correct? That is not a standard path to My Pictures.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Registered User
    Join Date
    11-22-2013
    Location
    USA
    MS-Off Ver
    2003, 2007, 2010, Office 365
    Posts
    31

    Re: Mouse Over CommandButton Does not Display Picture

    I understand your concern about the path not being standard. The path to the picture above was easier to explain than the real path which is like \\netappfs01usznvy.global.abcd.net\USZNVY_WP_FolderRedirect$\X124645\Documents. Thanks for asking.

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Mouse Over CommandButton Does not Display Picture

    The error message suggests you did not use a valid path.

+ 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. Scale CommandButton picture
    By reinht in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-23-2016, 02:51 AM
  2. Mouse Hover over a shape or picture and will display a text message
    By BI Guy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-18-2014, 10:17 AM
  3. Picture in Commandbutton
    By siobeh in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-16-2014, 01:00 PM
  4. [SOLVED] Commandbutton picture problem
    By Jim B in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-19-2006, 03:30 PM
  5. size FaceID picture on commandbutton
    By RB Smissaert in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-07-2006, 07:25 AM
  6. Change CommandButton Picture
    By TheVisionThing in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-14-2005, 01:30 PM
  7. [SOLVED] Displaying a picture by pushing CommandButton
    By Jean in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-14-2005, 08: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