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
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
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.
You 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.Originally Posted by volabos
2+2=9 ... (My Arithmetic Is Mental)
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,
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
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.
Regards,
Rory
Microsoft MVP - Excel
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
Last edited by Aussiebear; 04-08-2023 at 04:22 AM. Reason: Adjusted the code tags
Regards,
Rory
Microsoft MVP - Excel
Thanks Rory - that's exactly what I'm looking for.
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,