macros to create symbols

K

kramlys

I have a set of symbols to use in flow charts. Instead of clicking on the
drawing tool bar to create the symbols, I am trying to write some macros in
such a way that I will have buttons which I will just press and the symbols
will be created according to the respectively button that I will press.
Example pressing button A creates symbol A
 
P

Patrick Molloy

something like:

Sub AddRectangle()
With Selection
ActiveSheet.Shapes.AddShape msoShapeRectangle, .Left, .Top, .Width,
..Height
End With
End Sub

one for each shape, then link them to the buttons.
 
J

Joel

The one line macro below add a rectangle to the worksheet. the rectangle is a
standard shape. yo could do the same with clip art or a custom symbol that
you create.

If you are looking to add a character sysmbol then use this code. To run the
macro you have to get out of the text entry mode (typing characters into a
cell) to run the button. I'm adding the degree sign.

Private Sub CommandButton2_Click()
ActiveCell.Value = ActiveCell.Value & "°"
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top