Adjusting font size of action buttons with VBA
Posted: Wed Nov 29, 2017 1:24 pm
Hello,
I'm trying to easily adjust the font size on any of my action buttons in a worksheet. I figured I just change the font size by editing the "OLEOobjects".
This is my piece of code which I use to try to adjust the font size:
The first debug returns 112 as font size, which is correct. Then the second debug returns 12, due to the previous line changing the font size.
Unfortunately this doesn't seem to actually change something in the worksheet.
If I open the properties of the action button I can see it is still at size 112.
Does anyone know a solution to this problem?
I'm trying to easily adjust the font size on any of my action buttons in a worksheet. I figured I just change the font size by editing the "OLEOobjects".
This is my piece of code which I use to try to adjust the font size:
Code: Select all
Debug.Print Blad1.OLEObjects("TIButton16").Object.Font.Size
Blad1.OLEObjects("TIButton16").Object.Font.Size = 12
Debug.Print Blad1.OLEObjects("TIButton16").Object.Font.Size
Unfortunately this doesn't seem to actually change something in the worksheet.
If I open the properties of the action button I can see it is still at size 112.
Does anyone know a solution to this problem?