Hi,
I’m creating a dashboard in excel with a number of different charts. I wanted to add some text boxes at the bottom of each chart to explain what the chart is about but don’t want the text boxes to be visible all the time since it would clutter the dashboard.
I created a label and assigned it a MouseMove event that makes the text box visible when the mouse is moved over it. See code below:
The problem is that when the mouse is hovered/moved off the label, the textbox stays visible. I would want to hide the textbox if the mouse is not on top of the label. I’m new to events so I’m not sure if such an event exists. Could anyone please help with this?
Many thanks in advance!
I’m creating a dashboard in excel with a number of different charts. I wanted to add some text boxes at the bottom of each chart to explain what the chart is about but don’t want the text boxes to be visible all the time since it would clutter the dashboard.
I created a label and assigned it a MouseMove event that makes the text box visible when the mouse is moved over it. See code below:
VBA Code:
Private Sub Label1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Sheet2.Shapes(“TextBox 1”).Visible = True
End Sub
The problem is that when the mouse is hovered/moved off the label, the textbox stays visible. I would want to hide the textbox if the mouse is not on top of the label. I’m new to events so I’m not sure if such an event exists. Could anyone please help with this?
Many thanks in advance!