I have seen some worksheets where when you hover over a 'button' (with a hyperlink in) the button changes colour or the shadow effect changes.
Does anyone know how this can be done?
Kind regards
I have seen some worksheets where when you hover over a 'button' (with a hyperlink in) the button changes colour or the shadow effect changes.
Does anyone know how this can be done?
Kind regards
put this into a userform with a button in it![]()
Please Login or Register to view this content.
you can make it fun too:
![]()
Please Login or Register to view this content.
Last edited by Leon V (AW); 08-14-2013 at 06:02 AM.
Hi thanks for the reply. I am running Excel 2003 and am quite a novice. How do I get this to work in by workbook?
oh sorry thought it was a userform button
is this an activeX or form controls button?
Just an auto shape sorry i can change to control button![]()
http://www.ozgrid.com/forum/showthread.php?t=62478
see attached
Last edited by Leon V (AW); 08-14-2013 at 09:56 AM. Reason: put up example
Thank you but I cannot view the file as am at work behind a secure internet server (cannot download or view certain files) sorry. Thanks all the same though
Can you insert ActiveX Controls?
If you can Place an activeX image that is 20 pixels larger every side than your active x buton behind your active x button, make the image background and outline transparent then group the image and button.
place this code in the sheet object code (eddit as you see fit):
![]()
Please Login or Register to view this content.
I am sorry to say I do not know what an active X is in excel as I am a novice. I am not sure my work PCs will allow me to use active X.
Last edited by Leon V (AW); 08-15-2013 at 12:17 PM.
Thank you for this![]()
Ok I am going to sound very dumb here now.
Active x buttons making them 20pixels bigger all round (how do I do this)
The codes I never know where to put them in Excel.
I am very limited in my Excel exerience and have only discovered macros within the last month and that was only by chance.
I know excel can make the buttons I want change colour when hovered over by mouse pointer. I just have no clue at all in how to get this to work.
Ideally I need step by step instructions, I am limited in what can do in terms of downloads and websites due to the secure nature of my works PC.
Any help from you guys is very much appreciated but I need help on how to do these suggestions sorry.
Ok have worked out what active x is and I have been looking at the properties of the active x shape. is this where I change the pixel size?
Ok not a problem
steps:
1) start a new workbook and place an active x button and an active x image on sheet 1
2) right click and select "view code" on each of them [this should open up the VBA editor]
3) paste the code suplied earlier into the open VBA code sheet
4) in the VBA look at the object properties window [press F4 to open this]
5) in the properties window you will see the values for hight and width for each object [use the dropdown list to swap between button and image]
6) set the hight and width as required the image must be larger than the button
7) back in excel right click the active x image and send to back then place the button over them middle of the image and group them
8) check it all works and set the colours you wish the button to be in VBA [you may need to turn off design mode in VBA toolbar]
9) set the image background and border to transparent/None
Last edited by Leon V (AW); 08-19-2013 at 06:47 AM.
Thank you very much for this Leon V. I have followed your steps (very helpful) but for some reason my excel is not having any of it. It could be down to my excel may have reduced functionality through work.
Thaqnk you for your help though.
where is your excel falling over? [some steps could just require longer winded methods of exicution in excel 98-03]
I do not know where it is that it is failing sorry. I can get the active X image and button and size it all but once I put the code in nothing happens.
Without seeing what you are doing I can't really help my guess would be that the code is not linked to the active x controls because the names are different or you are pasting it in the wrong place.
when you right click and view code try using the dropdown on top right of VBA to select mousemove.
also make sure design mode is off. active x controls are inactive when design mode is on.
thank you for this.
Right I have got this working 'with fiddling I don't know how'.
But thank you very much.
I have a button set to change colour on mouse over then when you click a message appears. the last thing i want is for this button to take me to a link. The hyperlink option is not working.
change "CommandButton1" to whatever you named your button. The name is not necesarilly the text it displays (this is the caption) it is the title it was when you select it in the VBA editor properties dropdown.![]()
Please Login or Register to view this content.
Right I have to say a big thank you on this. I have now got my buttons labelled positioned and sized changing colour upon hovering to my desired colour, they link to either another worksheet or an internet site.
many thanks for this.
![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks