PDA

View Full Version : [SOLVED] How to change the shape of Command Button ?



volabos
12-02-2007, 09:28 AM
Hi all,

In Excel, generally "command button" comes with a rectangular shape. Is it possible to make it in other shape? For example, I want to change it to ARROW shape. Can anyone tell me whether is it possible?

Thanks and Regards,
Volabos

mikerickson
12-02-2007, 09:32 AM
No you can't, but you can assign a Macro to shapes, including arrows, from the Drawing Menu. The user clicks on the shape to run the macro.

unmarkedhelicopter
12-03-2007, 02:09 AM
Hi all,

In Excel, generally "command button" comes with a rectangular shape. Is it possible to make it in other shape? For example, I want to change it to ARROW shape. Can anyone tell me whether is it possible?

Thanks and Regards,
VolabosYou can place what shape you want on both a spreadsheet and a form (I think you are probably talking about a form, but it ain't clear) and you can assign whatever commands you want to a shape or even a picture so placed.

volabos
12-03-2007, 06:21 AM
Thanks mikericksonand other who has devoted their time on my problem. I have drawn an Arrow anf then assigned macro on it. It works fine. Thanks again for your suggestion.

Regards,

chrismc
01-04-2008, 09:06 AM
Hi,

I have also set up some shapes that I want to run macros from when I click on them.

I am trying to get a shapes to change fill colour when they are clicked on. How can I get the macro to know which shape was clicked on and then change the fill colour (say to red) of that shape whilst ignoring the other shapes.

If possible I would like to reuse the code for each of the shapes.

Thanks in advance.

Chris

rory
01-04-2008, 09:11 AM
If you use:
Activesheet.Shapes(Application.Caller)
that will refer to the shape that is calling the macro. You can then assign the same macro to all shapes.

rory
01-04-2008, 09:17 AM
To fill it:

Sub FillShape()
Dim shp As Shape
Set shp = ActiveSheet.Shapes(Application.Caller)
shp.Fill.ForeColor.RGB = RGB(255, 0, 0)
' rest of code here
End Sub

chrismc
01-10-2008, 10:59 AM
Thanks Rory - that's exactly what I'm looking for.

volabos
03-14-2008, 02:50 PM
In excel I found that option to assign macro, when I right click on a shape. however this option does not seem to be in word. Is it not possible to the same in word? If not, then can anyone suggest me some way to get "user-shaped" command button?

Regards,