command buttons

pwill

Active Member
Joined
Nov 22, 2015
Messages
406
Hi can anyone help?

I have a CommandButton12 that calls CommandButton1 multiple times. Sheet2

eg

Code:
Private Sub CommandButton12_Click()
Call CommandButton1_Click
Call CommandButton1_Click
Call CommandButton1_Click
End Sub

CommandButton1 calls different Sub routines.

If I want to call CommandButton1 five times or ten times or any other amount of times, I have to go back into the code and add the required amount of calls.

Would it be possible to add a dropdown list or form on Sheet2 to choose the required amount of calls between 1 to 100 for CommandButton1.

Any help would be apprieciated

Regards

pwill
 
Last edited:
I'm sorry but when I saw your original post it looked like a simple task.
So I provide a script to do that.
But now it sounds like you may want to click one command button that will run hundreds of script in hundreds of buttons all at the click of one button. And some scripts you may want to run more then once.

And just looking at one of your scripts shows these are not simple little scripts.

I believe you could find this difficult to do.

But there are a lot of other people on this forum smarter then me so hopefully someone else here will be able to help you.
I will continue to monitor this thread.
 
Upvote 0

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Hi My Aswer Is This, you underestimate yourself,

I have just ran your code and it is exactly what I was after :) actually better because I was thinking maybe a dropdown list with a scroll action but your code allows me to just enter what I like, much more convienent :) thank you for your patients much apprieciated.

Regards

pwill
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,187
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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