ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   macros to create symbols (https://www.excelbanter.com/excel-programming/429774-macros-create-symbols.html)

kramlys

macros to create symbols
 
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

Patrick Molloy

macros to create symbols
 
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.




"kramlys" wrote in message
...
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



joel

macros to create symbols
 
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

"kramlys" wrote:

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



All times are GMT +1. The time now is 10:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com