PDA

View Full Version : VBA to insert and format a shape



radioMic
03-04-2022, 02:06 PM
I have played with VBA in Excel and, knowing what I don’t know, I know when to ask for help.

I have skulked around the interwebs and found how to insert a shape with VBA ( playing with the msoFreeform ), but cannot seem to find anything useful on a few other of the attributes I would like to make use of. Mind you, it doesn’t help that I cannot select and modify the shape when recording a macro, otherwise I may not be here asking.

What I would like to do is ask is anyone knows of any sites that can assist with how to do the following using VBA -

Insert the shape at the current location in the document. I don't think using the Left and Top edged parameters will work.
Changing the shape fill and line colors, as well as the lines weight.
Adding text to the shape and that text being a 2x1 table.

Changing the attributes of the cells in the table, such as text alignment and font type and size.



I know it's probably a bit of an odd, and big ask, but still want to say thanks in advance for any guidance and insight provided.