Hi,
I've found and adapted the following code for utilizing the cell comment feature as a mouse hover description on a command button :
Problem is that the mouse over potion of the code seems to override the hyperlink code so that the cell comment hover option works but when you click the button nothing happens.
Any help or assistance would be appriciated.
I've found and adapted the following code for utilizing the cell comment feature as a mouse hover description on a command button :
Code:
Private Sub CommandButton3_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Application.EnableEvents = False
On Error Resume Next
'assuming your comment is in AC3
Range("AC3").Comment.Visible = True
Pause 1
Range("AC3").Comment.Visible = False
Application.EnableEvents = True
End Sub
Public Function Pause(DelayInSeconds)
Dim StartTime As Double
StartTime = Timer
Do While Timer < StartTime + DelayInSeconds
DoEvents
Loop
End Function
Private Sub CommandButton3_Click()
On Error GoTo 1
ActiveWorkbook.FollowHyperlink "http://about.me/AboutCatherine", NewWindow:=True
Exit Sub
1: MsgBox Err.Description
End Sub
Problem is that the mouse over potion of the code seems to override the hyperlink code so that the cell comment hover option works but when you click the button nothing happens.
Any help or assistance would be appriciated.