Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to add mouse over tip to a certain shape in Excel?

In many cases, you need to assign macro to a certain shape so as to run the macro by clicking it in your worksheet. After assigning macro to the shape, adding mouse over tip can help to remind you what the shape does in future use. This article shows you two methods to add mouse over tip to a certain shape in Excel.

Add mouse over tip to a certain shape with adding hyperlink

Add mouse over tip to a certain shape with VBA code


Add mouse over tip to a certain shape with adding hyperlink


You can add hyperlink with ScreenTip to a certain shape in worksheet. Please do as follows.

1. Right click the shape you need to add mouse over tip, then click Hyperlink from the right-clicking menu. See screenshot:

2. In the Insert Hyperlink dialog box, click the ScreenTip button. And in the Set Hyperlink ScreenTip dialog box, enter the screen tip text you need to display while hovering over the shape by mouse. Finally click the OK button. See screenshot:

3. When it returns to the Insert Hyperlink dialog box, click the Bookmark button. Then enter A1 into the Type in the cell reference box of the Select Place in Document dialog box, and finally click the OK button.

4. Click the OK button in the Insert Hyperlink dialog box to finish the hyperlink creating.

Now you can see the screen tip displaying when hovering over the shape by mouse.


Add mouse over tip to a certain shape with VBA code

You can easily add mouse over tip to a certain shape after running the following VBA code.

1. Open the worksheet contains the shape you will display tip when moving mouse over. Right click the sheet tab and then click View Code from the context menu.

2. In the Microsoft Visual Basic for Applications window, please copy the below VBA code into the Code window.

VBA Code 1: Add mouse over tip to a certain shape

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Updated by Extendoffice 2018/3/30
    If Target.Address = Range("A1").Address Then
        Call MoveRow
    End If
End Sub

3. Click Insert > Module. Then enter below VBA code into the Module window.

VBA Code 2: Add mouse over tip to a certain shape

Sub Text()
'Updated by Extendoffice 2018/3/30
    Dim xShape As Shape
    Dim xRg As Range
    On Error Resume Next
    Application.EnableEvents = False
    Set xShape = ActiveSheet.Shapes("Rectangle 4")
    If Not xShape Is Nothing Then
        ActiveSheet.Hyperlinks.Add xShape, "", "A1", ScreenTip:="Click to run Macro "
    End If
    If ActiveSheet.Hyperlinks(1).SubAddress = "A1" Then
        Call MoveRow
    End If
    Application.EnableEvents = True
End Sub

Notes:

1). Please replace the “Click to run Macro” and “Rectangle 4” with your screen tip text and the name of the certain shape.

2). Replace "MoveRow" in line "Call MoveRow" to the macro name you have assigned to the shape

3. Press the F5 key to run the code. Then the specified screen tip is added to the certain shape immediately.


Related articles:


Recommended Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300+ Advanced Features Increase Your Productivity by 71%, and Help You To Stand Out From Crowd!

Would you like to complete your daily work quickly and perfectly? Kutools For Excel brings 300+ cool and powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) for 1500+ work scenarios, helps you solve 82% Excel problems.

  •  Deal with all complicated tasks in seconds, help to enhance your work ability, get success from the fierce competition, and never worry about being fired.
  •  Save a lot of work time, leave much time for you to love and care the family and enjoy a comfortable life now.
  •  Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands, and give you a healthy body.
  •  Become an Excel expert in 3 minutes, and get admiring glance from your colleagues or friends.
  •  No longer need to remember any painful formulas and VBA codes, have a relaxing and pleasant mind, give you a thrill you've never had before.
  •  Spend only $39, but worth than $4000 training of others. Being used by 110,000 elites and 300+ well-known companies.
  •  60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years. Buy once, use forever.
  •  Change the way you work now, and give you a better life immediately!

Office Tab Brings Efficient And Handy Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Open and create documents in new tabs of same window, rather than in new windows.
  • Help you work faster and easily stand out from the crowd! One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Niall · 1 years ago
    Doesn't work..... if there is a hyperlink associated with the shape then the macro will not run....
    • To post as a guest, your comment is unpublished.
      crystal · 1 years ago
      Dear Niall,
      Sorry for the mistake. Please try as below to solve the problem.

      Step 1:
      In the worksheet contains the shape you will display tip, right click the sheet tab and select View Code from the context menu. And then copy below VBA into the Code window:

      Private Sub Worksheet_SelectionChange(ByVal Target As Range)
      If Target.Address = Range("A1").Address Then
      Call MoveRow
      End If
      End Sub

      Step 2:
      Open the Module code window, copy below code into the Module window.
      Please change "MoveRow" in the line Call MoveRow to the macro name you assigned to the shape, and then press the F5 key to run the code.
      Thank you for your comment.

      Sub Text()
      Dim xShape As Shape
      Dim xRg As Range
      On Error Resume Next
      Application.EnableEvents = False
      Set xShape = ActiveSheet.Shapes("Rectangle 1")
      If Not xShape Is Nothing Then
      ActiveSheet.Hyperlinks.Add xShape, "", "A1", ScreenTip:="Click to run Macro "
      End If
      If ActiveSheet.Hyperlinks(1).SubAddress = "A1" Then
      Call MoveRow
      End If
      Application.EnableEvents = True
      End Sub
    • To post as a guest, your comment is unpublished.
      crystal · 1 years ago
      Dear Niall,
      The code works well in my case. Can you provide your Office version? Thank you for your comment.
  • To post as a guest, your comment is unpublished.
    Evaldas · 2 years ago
    Hello,

    Sub Test()
    On Error Resume Next
    Dim xShape As Shape
    Set xShape = ActiveSheet.Shapes("Rectangle 4")
    If Not xShape Is Nothing Then _
    ActiveSheet.Hyperlinks.Add xShape, "", "", ScreenTip:="Click to run Macro "
    End Sub

    Thank code works great, but it removes Assigned macro.

    When i use Screen Tip and press on shape Macro Deosn't work.

    Is any way to fix that? Use Screen tip on shape and keep macro working?

    Thank youĄ
    • To post as a guest, your comment is unpublished.
      crystal · 1 years ago
      Dear Evaldas,
      Sorry for the mistake. Please try as below to solve the problem.

      Step 1:
      In the worksheet contains the shape you will display tip, right click the sheet tab and select View Code from the context menu. And then copy below VBA into the Code window:

      Private Sub Worksheet_SelectionChange(ByVal Target As Range)
      If Target.Address = Range("A1").Address Then
      Call MoveRow
      End If
      End Sub

      Step 2:
      Open the Module code window, copy below code into the Module window.
      Please change "MoveRow" in the line Call MoveRow to the macro name you assigned to the shape, and then press the F5 key to run the code.
      Thank you for your comment.

      Sub Text()
      Dim xShape As Shape
      Dim xRg As Range
      On Error Resume Next
      Application.EnableEvents = False
      Set xShape = ActiveSheet.Shapes("Rectangle 1")
      If Not xShape Is Nothing Then
      ActiveSheet.Hyperlinks.Add xShape, "", "A1", ScreenTip:="Click to run Macro "
      End If
      If ActiveSheet.Hyperlinks(1).SubAddress = "A1" Then
      Call MoveRow
      End If
      Application.EnableEvents = True
      End Sub
    • To post as a guest, your comment is unpublished.
      Ringleader · 1 years ago
      I wish someone would solve this problem.
      • To post as a guest, your comment is unpublished.
        crystal · 1 years ago
        Good Day,
        Please try as below to solve the problem.

        Step 1:
        In the worksheet contains the shape you will display tip, right click the sheet tab and select View Code from the context menu. And then copy below VBA into the Code window:

        Private Sub Worksheet_SelectionChange(ByVal Target As Range)
        If Target.Address = Range("A1").Address Then
        Call MoveRow
        End If
        End Sub

        Step 2:
        Open the Module code window, copy below code into the Module window.
        Please change "MoveRow" in the line Call MoveRow to the macro name you assigned to the shape, and then press the F5 key to run the code.
        Thank you for your comment.

        Sub Text()
        Dim xShape As Shape
        Dim xRg As Range
        On Error Resume Next
        Application.EnableEvents = False
        Set xShape = ActiveSheet.Shapes("Rectangle 1")
        If Not xShape Is Nothing Then
        ActiveSheet.Hyperlinks.Add xShape, "", "A1", ScreenTip:="Click to run Macro "
        End If
        If ActiveSheet.Hyperlinks(1).SubAddress = "A1" Then
        Call MoveRow
        End If
        Application.EnableEvents = True
        End Sub