Hi,
1. Can someone please explain why for a commandbutton in VBA for Excel 2010 (and other versions maybe) I can change its properties through Worksheets(1).Shapes(1).Top (or .Left, .Width, .Height) but I cannot change the font size. I tried Worksheets(1).Shapes(1).Font.Size, or Worksheets(1).Shapes(1).TextEffect.FontSize, or Worksheets(1).Shapes(1).TextFrame.Characters.Font.Size, but was always getting run-time errors.
2. I was getting desperate but found that I could access the commandbutton properties through the OLEObjects collection. I found an example on the web showing that I could set the dimension properties with: Worksheets(1).OLEObjects(1).Top (or .Left, .Width, .Height). But what bugs me is that the Font size property can only be accessed through Worksheets(1).OLEObjects(1).Object.Font.Size. So why through the Object property of the OLEObject and not through the OLEOBject directly like for the dimension/placing properties?? I don't get it !
3. As stupid as this might sound to an expert, I went back and tried Worksheets(1).Shapes(1).Object.Font.Size. I did not expect that to work but wanted to check just to understand better that I was effectively dealing with 2 different concepts, and it effectively didn't work.
Thanks so much for helping out!
Bookmarks