Search code examples
excelcommandbuttonvba

How to make a VBA commandbutton looks like was clicked?


I was looking over the Internet and could not find a solution to my problem.

I would like to make a VBA commandbutton look like it was clicked. To be precise I want it to look like it was pressed. It is easy to change background or foreground but is there a way to make it look like it is pressed?


Solution

  • If you use a ToggleButton instead, its default behaviour is exactly what you are looking for. :)