Assigning Code to Buttons within an Embedded Multi-Page Obj

ttt123

Board Regular
Joined
May 31, 2006
Messages
120
Office Version
  1. 365
Platform
  1. Windows
Hi Everyone,

I have a user form that contains a multi-page object in it and each page has some buttons and textboxes on it. I wanted to put this multipage object directly embedded into the spreadsheet and I just recently found out that i could insert a multi-page object directly into a spreadsheet by clicking view->Toolbars->ControlToolbox, then clicking the "More controls" icon and then selecting Microsoft Forms 2.0 MultiPage.

Unfortunately, however, I can't figure out how to assign code to events that occur to objects in the multipage. For example, if I create a command button, I cannot figure out how to create a click event associated with that button. There must be a way to do it, but it seems that the only events that gets recognized are events that happen directly to the MultiPage object and not to any objects contained within it.

So for example, the multipage's click event works whereas a command button, contained within the mulitpage, cannot have button click code associated with it. If you go into design mode and double click on the button, you are not brought to the VBE (like you normally would). And the macro recorder does not record actions that occur to the embedded multipage object.

Does anyone know how I can get these events to register? I would really like to migrate my mutlipage from the userform to directly into the spreadsheet.

Thanks,
-Taylour
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
I don't think you can embed a CommandButton in the MultiPage that way. If you can, it's news to me. The CommandButton will be separate from the MultiPage. Therefore, you'll have to reference the Multipage in your CommandButton code.
 
Upvote 0

Forum statistics

Threads
1,214,523
Messages
6,120,028
Members
448,940
Latest member
mdusw

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