Results 1 to 6 of 6

Add Tooltip to Shape with Macro to include Text and cell value

Threaded View

ADawn Add Tooltip to Shape with... 05-10-2023, 02:16 AM
Norie Re: Add Tooltip to Shape with... 05-10-2023, 02:29 AM
ADawn Re: Add Tooltip to Shape with... 05-10-2023, 07:42 PM
Norie Re: Add Tooltip to Shape with... 05-11-2023, 02:41 AM
AliGW Re: Add Tooltip to Shape with... 05-11-2023, 02:45 AM
leelnich Re: Add Tooltip to Shape with... 05-11-2023, 12:13 PM
  1. #1
    Registered User
    Join Date
    01-16-2023
    Location
    Adelaide,Australia
    MS-Off Ver
    365
    Posts
    6

    Add Tooltip to Shape with Macro to include Text and cell value

    Hi all,

    Hoping someone might be able to assist. I am a novice to macros and I'm not sure if what I want is possible. I found the below code to add a toolTip to a shape. Is it possible to expend on this to also include some cell values?

    For Example: My shape currently includes the tooltip (Mixing Pad) but I also want to include cell D2 value, possibly with D2 text

    So the tooltip would show

    Mixing Pad. Total 5

    Thanks


    Capture.JPG






    Sub Oval1_Click()
    Dim selectedShapes As Shape
    Dim toolTipText As String
     
    toolTipText = InputBox( _
                    Prompt:="Input a ToolTip for the selected shapes.", _
                    Title:="ToolTip Input")
     
    For Each selectedShapes In Selection.ShapeRange
     
        ActiveSheet.Hyperlinks.Add _
            Anchor:=selectedShapes, _
            Address:="", _
            ScreenTip:=toolTipText
            
    Next
     
    End Sub
    Last edited by AliGW; 05-11-2023 at 02:44 AM. Reason: Code tags added.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 8
    Last Post: 08-06-2022, 07:29 PM
  2. [SOLVED] Add tip text into shape and assign also macro
    By jaryszek in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-22-2020, 01:57 AM
  3. Replies: 5
    Last Post: 05-02-2014, 07:49 PM
  4. [SOLVED] Editing a Macro to include multiple rows and include text formatting for leading zeros
    By missmea2005 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-04-2014, 09:50 AM
  5. VBA to Get Tooltip text in Pivot Table
    By cyclone1980 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-21-2014, 07:13 PM
  6. [SOLVED] Change the tooltip text for a datapoint
    By Hayeso in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 12-16-2005, 09:35 AM
  7. Tooltip text over a label
    By John Robinson in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-27-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