Have existing button! Can I add existing buttons to New User Form???

michaelch2934

New Member
Joined
Sep 17, 2018
Messages
34
Obviously new to VBA. I've created spreadsheet with many buttons and text boxes, etc... Now, I realize I should have placed them on a User Form for better control.

Is this even possible? Can I add existing buttons to a new user form?

I've searched the internet and especially your site for the answer. Seems I've painted myself into a corner, as it were. Any suggestions?
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
I would add all new controls to your Userform and then put your existing code into those controls.
You cannot just copy a activex button and paste it into your userform.

Now if all your scripts are Module scripts you could put a call function into your Userform controls to run those script.

For example if your module script is named Hello

In your Userform control you could just enter this line of code:

Call Hello

And the module script named Hello would run.
 
Upvote 0
Building a Userform is not that hard. You have all the same sort of controls you can add to the Userform just like Activex controls. Put your control where you want and put your script into the control by double clicking the control.

I'm sure you can figure it out. If you need some help maybe we can give you some help.
 
Upvote 0

Forum statistics

Threads
1,223,155
Messages
6,170,403
Members
452,325
Latest member
BlahQz

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