Edit tooltip on 3D point cloud in Excel 2003

Solved
Hello

How can you modify the tooltip when hovering over a point in a scatter chart (Excel 2003)

Thanks

11 answers

  • Votes
  • Date
  • Descending date
  1. First, you need to add a rectangle to each chart, then restore the rectangle masking if the mouseover is not on a point, and restore the display of this "rectangle 1" with the content of textbox1.text created by your macro.

    I have modified the rectangle positioning to be more pleasant when you move the mouse.

    https://www.cjoint.com/c/DLupZWNFVjG

    cordially
    1. I suspect it must be twisted, but isn’t there a way to achieve it via macro(s)?
      1. Contributor
        Maybe! We do so many things with a macro ...

        --
        It's good, retirement! Especially in the Antilles ... :-)
        Raymond (INSA, AFPA, CF/R)
        1. Thank you,

          I managed to retrieve the point number, that's something already, but not able to modify the tooltip attached to the point

          Regards
          1. hello ccm81,

            do you have a file with whatever you want?
        2. Thank you,

          I added the test on the ElementID value (3 for a point) and transformed AfficheInfo into a function (it looks cleaner), it works well (and it’s more rewarding than double-click) to fill the textbox, but it doesn’t affect the tooltip of the points

          Private Sub Graph_MouseMove(ByVal Button As Long, ByVal Shift As Long, _
          ByVal x As Long, ByVal y As Long)
          Dim ElementID As Long
          Dim Arg1 As Long, Arg2 As Long
          On Error Resume Next
          ActiveChart.GetChartElement x, y, ElementID, Arg1, Arg2
          If ElementID <> 3 Or Arg2 = 0 Then
          ActiveSheet.TextBox1.Text = ""
          Else
          ActiveSheet.TextBox1.Text = AfficheInfos(Arg2)
          End If
          End Sub

          Regards
          1. well normal since I removed the tooltip to redirect to the textbox!!

            if you want both, you need to put the tooltip part back into the class module

            best regards
        3. OK, and what’s the trick? (I’m discovering Class Modules so you’ll understand I’m struggling, shut up)
          1. Beautiful trick to bypass the problem; we just need to work on the rectangle’s coordinates so that it doesn’t disappear when approaching the edges of the graph, I think I can handle that myself.
            Thank you again
            I’ll wait a bit before marking it as resolved

            Have a good rest of the day

            Best regards
            1. Contributor
              It’s impossible.

              --
              It’s good, retirement! Especially in the Antilles ... :-)
              Raymond (INSA, AFPA, CF/R)