If you want to show any image on mouse-over on command button
Goto Developer Tab -> Insert -> choose label in Active x (add it to the sheet)
Goto Developer Tab -> Insert -> choose command button in Active x (add it to the sheet , and paste on the top of label)
Note Labels size should be bigger than command buttons size( You need to paste or add command button over the label)
Add a shape which you wanna show on the mouse over and give it some name
For example Mouse_t_1
To change the name of image . Select image and type name in the below box ( left to the forumla tab)
Goto label and right click choose property
Goto Worksheet module and add below code to it
Private Sub CommandButton1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
ActiveSheet.Shapes("Mouse_t_1").Visible = True
Private Sub Label1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
ActiveSheet.Shapes("Mouse_t_1").Visible = False
Logic: Label size is bigger than command button and command button is pasted or added over label. When you will keep the mouse on command button it will make the shape visible and when you remove the mouse button the label( mouse over) will make the shape invisible
Friday, March 30, 2012
Display Image on Mouseover
Subscribe to: Post Comments (Atom)
Import data from SQL
Macro to import data from SQL using ADO connection string: Sub Import_data_from_SQL() ' Tools -> References -> Microsoft Active...
If you want to add a new menu on mouse right click "Workbook Navigation showing you the list of all open workbooks and worksheets in ea...
Macro to Export Range in Json Format Option Explicit Sub export_in_json_format() Dim fs As Object Dim jsonfile Dim rangetoex...
Hi, thanks for tutorialReplyDelete
I made button mouse over effect on template.