Can I accomplish multiple objectives using VBA in a dashboard (1) hovering over objects (2) upon clicking objects

brockk

Board Regular
Joined
Jul 1, 2006
Messages
170
Office Version
  1. 2013
Platform
  1. Web
Greetings and Happy Holidays Excel Gurus,

I am trying to achieve something I feel is way over my head as I am a total nube in VBA. I have a sales dashboard with several KPI's (6 in total). Each are represented by a rectangular object. Each object has a default color of a Black background with Magenta Text; and I would like it to be user friendly and to somewhat impress my boss. I have the need to be able to assign 2 macros to each of the objects, that is, if this can't be done all in one UDF. This is what I am trying to accomplish with the macro(s):

1- I would like it to change the colors of the active object in reverse ( to Background in Magenta with text being black) when HOVERING OVER the object while all others remain in tact, and once its not hovered over for it to go back to its default colors of Background in black and text in Magenta. This is the part that has me mentally challenged.

2- I would like to LINK it to other worksheets if the active object is CLICKED. (This part I think I can manage on my own if it can't all be done in one UDF as it may require individual macros.)
KPI links in the workbook are: Sales, UPT, DPT, APC, Max_Base, Attach. Hope this helps. Thanks in advance for any help that can be given.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Capture.PNG

Greetings! In the attahced photo will show what I am trying to accomplish. These are the 6 KPI objects and what effect I want to achieve. Among the 6 objects given, if you HOVER over it I would like it to invert the colors of both the background, as well as, the color of the text. Then if he CLICKS on it, I would like it to Hyperlink/Link to its corresponding named worksheet. HTH.
 
Upvote 0
The thing is, shapes do not have a mouse move event so trapping the hover operation is not possible

There are some workarounds one of them is by using ActiveX commandbuttons instead of shapes. Another workaround is by keeping the shape but placing it within a transparent ActiveX label so the label can intercept the mouse hover before reaching the shape.

You should be able to find some code examples on this site if you do a search.
 
Upvote 0

Forum statistics

Threads
1,214,784
Messages
6,121,539
Members
449,038
Latest member
Guest1337

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top