![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Apr 2002
Posts: 68
|
Is it possible to create a Mouse-over type of effect in excel? I have a Navigation page setup and would like to hi-lite or change the color of 1 or 2 other cells. For example: The main header is in A1 and a sub-header is at A2. Could it be coded where upon a mouse-over of A1 would hi-lite A2 or something similair?
Thank you, Waxaholic |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
There are several ways you could do this...
If the user will not be entering data into Cell A1, an image box could be drawn out to cover Cell A1. Then by using the image box's mouse move event, you could manipulate Cell A2 as you wish... Example: Draw an activeX image box which covers A1 and then place this code in the worksheet's code pane...
The larger the interior area of cell A1, the more accurate this will work. If the user moves the mouse too rapidly, Cell A2 may not reset to default. This procedure will change the interior color to yellow as the mouse is moved over cell A1, and back to no fill as the mouse exits the area of Cell A1. The other alternative would be to use an API routine to capture the mouse coordinates... Let us know if this works or not. Tom |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Apr 2002
Posts: 68
|
That works great. I have just one more question. How can i label Cell A1? I tried overlaying a text box but then it doesn't allow the mouse-over. I didn't see anywhere in the ActiveX image properties to allow for a visible label. Thanks for the help.
Waxaholic |
|
|
|
|
|
#4 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
and just load it into the image via the images picture property. Any number of graphics prgms will allow you do manipulate an image to get what you want..... |
|
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Apr 2002
Posts: 68
|
I considered just that but do not want to have to send the image along with the spreadsheet when giving the workbook to another person. I also wanted to avoid storing the image in the workbook as well. I substituted a Text Box control instead of the Image control and this works. Thanks again for all the help.
Waxaholic |
|
|
|
|
|
#6 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
The image will be inserted as an object of the imagecontrol ?? |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|