Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21178

text to display under Mouse Arrow on CommanBuuton1 while the mouse is hovering.

$
0
0
Hi,
I need help in enabling a text to appear below the mouse when the mouse is hovering on CommandButton1 in the Excel. I tried using the above code in VB 6.5 Editor in Excel. The code didnt do any thing when the mouse is hovering on the CommanButton1. Here is the code. Would you please look into?

--------------------
Private Sub CommandButton1_Click()

Dim stFolder As String


stFolder = "C:\Documents and Settings\a\My Documents\Folder"

If Len(Dir(stFolder, vbDirectory)) <> 0 Then
Shell "Explorer.exe /n,/e," & stFolder, vbNormalFocus
Else
MsgBox "The folder is either removed or renamed!", vbCritical
End If

End Sub
---------------------
Private Sub CommandButton1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
If X < 1 Or X > CommandButton1.Width - 1 Or Y < 1 Or Y > CommandButton1.Height - 1 Then
caption = "Hi" ' change to desired effect
Else
caption = "Hello"
End If

End Sub
------------

Viewing all articles
Browse latest Browse all 21178

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>