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

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
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,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

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