+ Reply to Thread
Results 1 to 3 of 3

Macros for mouseover to popup data from another spreadsheet and disappear when mouse leave

Hybrid View

  1. #1
    Registered User
    Join Date
    01-16-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    5

    Macros for mouseover to popup data from another spreadsheet and disappear when mouse leave

    Hi,
    I'm struggling to find the macros to pop up data from another spread sheet when mouse points to the command button and pop up disappear when mouse leave it. Somebody please help me. Thanks.
    Attached Files Attached Files

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

    Re: Macros for mouseover to popup data from another spreadsheet and disappear when mouse l

    There IS NOT a mouse-over event. The closest you are going to come, without selecting cells is to add a comment box to a cell, then you can mouse over the cell and display the content in the comment box.
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    11-17-2004
    Posts
    3

    Re: Macros for mouseover to popup data from another spreadsheet and disappear when mouse l

    Here's a nifty way you can do it.

    Add a MouseMove event handler to your CommandButton and call the following ShowPop() method:

    Public PopupVisible As Boolean
    
    Public Sub ShowPopup(TargetControl As Object, MouseX As Single, MouseY As Single, Content As String)
    
        Dim boolShowPopup As Boolean, boolIsInsideX As Boolean, boolIsInsideY As Boolean
    
        boolIsInsideY = MouseY > 0 And MouseY <= TargetControl.Height
        boolIsInsideX = MouseX > 0 And MouseX <= TargetControl.Width
    
        boolShowPopup = boolIsInsideX And boolIsInsideY
    
        If Not PopupVisible And boolShowPopup Then
            Set PopupForm.Owner = TargetControl
            PopupForm.Content = Content
            PopupForm.Show False
    
        ElseIf boolShowPopup = False Then
            Unload PopupForm
            PopupVisible = False
        End If
    
    End Sub
    Attached is your original Excel file with working code. This can help you get started...you can refine the placement of the popup form and modify how you want to set the content on the popup form.
    Attached Files Attached Files

+ 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. Macros needed to show popup when mouseover
    By Atan4 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-29-2013, 11:03 PM
  2. Have data labels appear and disappear as mouse hovers on graph
    By gipescob in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 09-13-2012, 07:41 PM
  3. MouseOver cell that makes apear and disappear an image
    By blakito in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-20-2012, 12:57 PM
  4. MouseOver cell that makes apear and disappear an image
    By first_mo_za in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-20-2012, 03:37 AM
  5. Mouseover or Mouse Move events
    By Geoff in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-04-2005, 04: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