MouserOver on button

MouserOver on button


I want to add a mouseOver effect on buttons using VBA. So far my code goes as follows :

VBA Code:

Public Sub MouseOver_Color(obElem As Element, vPosX As Variant, vPosY As Variant)

obElem.BackColor = RGB(246, 152, 4)
obElem.ForeColor = RGB(255, 255, 255)

End Sub

But I would like to also modify the shadow and transparency of the button when the mouse is on it.
How can I achieve that?

Thanks !

This is a migrated post! Originally posted on 14.08.2019 by user pbibet. Please be aware that information can be outdated.