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.
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.
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
Here's a nifty way you can do it.
Add a MouseMove event handler to your CommandButton and call the following ShowPop() method:
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.![]()
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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks