• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Want to Change Mouse Cursor

Hello,

I want to change the mouse pointer from (plus sign to arrow or something) in excel through VBA. I have a range of cells data and each cell is hyperlinked through VBA. But the cursor point is plus sign which I want to change and can understand the data is hyperlinked.

Please help me and thanks in advance.

Regards,
Manik
 
The cells in column F of the Top sheet are not real hyperlinks, however if you add your own hyperlinks the cursor will change as you hover over them. Just add links to the PD sheet (you can do it to all the cells in column F at once).
See attached. This is the same attachment as found at https://chandoo.org/forum/threads/h...heet-for-different-project.37240/#post-223784.
It needed a tweak or two to the Selection_Change event too:
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim rPrjIds As Range
Set rPrjIds = Range("F8:F108")
If Target.Count = 1 Then
  If Not Application.Intersect(Target, rPrjIds) Is Nothing Then
    sPrj = Target.Offset(0, -4).Value
    Select Case sPrj
      Case Is <> ""
        Sheets("PD").Range("rPrjTarget") = sPrj
        Sheets("PD").Activate
      Case Else
        Exit Sub
    End Select
  End If
End If
End Sub
Note: the hyperlinks in the attached workbook are in fact to the Top sheet, not the PD sheet - the Selection_Change event is responsible for activating the PD sheet.
 

Attachments

  • Chandoo41031Hyperlink To Projects2.xlsm
    30.8 KB · Views: 2
Last edited:
Sir,

Thank you so much once again. I have been done same after getting your help. But it was showing address when I hover over them so is there any vba code that hyperlink them but do not show the address?
 
Click on the screen tip button while your adding the hyperlink and enter a single space.
In the attached there's a Macro8 which adds hyperlinks and uses the contents of column B as the screen tip text.
Code:
Sub Macro8()
For Each cll In Sheets("Top").Range("F8:F12").Cells 'adjust this range.
  cll.Hyperlinks.Delete
  'next line adds a hyperlink with a screen tip showing column B contents:
  cll.Parent.Hyperlinks.Add Anchor:=cll, Address:="", SubAddress:="PD!C2", ScreenTip:=cll.Offset(, -4).Value, TextToDisplay:="Hplnk"
  'OR this line shows a single space for a screen tip (it looks like a screen tip of some sort must show):
  ' cll.Parent.Hyperlinks.Add Anchor:=cll, Address:="", SubAddress:="PD!C2", ScreenTip:=" ", TextToDisplay:="Hplnk"
Next cll
End Sub
 

Attachments

  • Chandoo41031Hyperlink To Projects2.xlsm
    32.1 KB · Views: 4
Back
Top