Shape versus Form control

nej12

New Member
Joined
Nov 10, 2018
Messages
23
Hello, looking for opinions? Is there a good reason for choosing a form control over a shape to assign a macro? Is one more reliable than the other? I believe I had trouble with shapes before any thoughts her responses are appreciate it thank you!
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
I assume you are talking about using a shape the same way you would use a button, where the only thing you want to do is click it to run a macro. There is not much difference. I can't think of a clear benefit of using a Forms buttons vs. a shape.

(I personally prefer ActiveX controls to either one of those because the code features are more powerful, although they can't be used on a Mac.)
 
Upvote 0
I assume you are talking about using a shape the same way you would use a button, where the only thing you want to do is click it to run a macro. There is not much difference. I can't think of a clear benefit of using a Forms buttons vs. a shape.

(I personally prefer ActiveX controls to either one of those because the code features are more powerful, although they can't be used on a Mac.)
Thanks for the response. I like ActiveX too. For the shapes I think I might have been trying to use some as labels only and some had macros so I would click on the non-macro shape in error and get confused lol. I think that's why I moved to form buttons and used plain cells as labels. Geesh! ActiveX controls I go nuts and try to be too fancy and go down rabbit wholes ? and get stuck sometimes.
 
Upvote 0
I know you have already clicked the solved button but:
I like Module scripts that I assign to a shape.
Module scripts can be activated by a shortcut Key or a Shape or also assigned to a Activex Button.
A script in a Activex button as far as I know cannot be activated by a shortcut Key.
A Module script is one like you get when you run the recorder.
In a activex button enter something like this:
If your module script is named "Hello"
Enter Call Hello
to run the script in a activex button
 
Upvote 0
@nej12
Please refer to my recent Conversation Message to you about use of 'Mark as solution'. Your post (#3) here does not specifically answer your original question so should not be marked as such - so I have removed the mark.
Since you quoted @6StringJazzer in post #3 perhaps you were trying to indicate their response as the solution/answer? If so, then you should mark post #2. If none of the responses answer your question specifically then don't mark any as the solution.
 
Upvote 0
Module scripts can be activated by a shortcut Key or a Shape or also assigned to a Activex Button.
A script in a Activex button as far as I know cannot be activated by a shortcut Key.
I am not following your terminology here, but it's quite simple to use the same code to invoke by clicking a shape, clicking an ActiveX control, or using a shortcut key.

In a Worksheet module containing the ActiveX control:
VBA Code:
Private Sub CommandButton1_Click()
   DoSomeWork
End Sub
In a Standard module:
VBA Code:
Public Sub DoSomeWork()
   ' Code here to perform the desired action
End Sub
Sub DoSomeWork can be the assigned macro for a Shape, and it can be given a keyboard shortcut. It can also, of course, be called from any other code.
 
Upvote 0
I know you have already clicked the solved button but:
I like Module scripts that I assign to a shape.
Module scripts can be activated by a shortcut Key or a Shape or also assigned to a Activex Button.
A script in a Activex button as far as I know cannot be activated by a shortcut Key.
A Module script is one like you get when you run the recorder.
In a activex button enter something like this:
If your module script is named "Hello"
Enter Call Hello
to run the script in a activex button
Very helpful, thank you.
 
Upvote 0
I am not following your terminology here, but it's quite simple to use the same code to invoke by clicking a shape, clicking an ActiveX control, or using a shortcut key.

In a Worksheet module containing the ActiveX control:
VBA Code:
Private Sub CommandButton1_Click()
   DoSomeWork
End Sub
In a Standard module:
VBA Code:
Public Sub DoSomeWork()
   ' Code here to perform the desired action
End Sub
Sub DoSomeWork can be the assigned macro for a Shape, and it can be given a keyboard shortcut. It can also, of course, be called from any other code.
Thank you, this was a good reminder and helpful too
 
Upvote 0

Forum statistics

Threads
1,214,965
Messages
6,122,499
Members
449,089
Latest member
Raviguru

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top