Combobox inside a multipage inside a frame on a worksheet

Ploos

New Member
Joined
Jan 9, 2017
Messages
8
Hi all,

I have a worksheet (sheet1) and it has a frame (frame1). Inside the frame there is a multipage (multipage1) en inside that multipage, on page1 there is a combobox (combobox1). I would like to know the right way to tell VBA how to fill that combobox using a list that's on sheet2.
I know how to do this with regular comboboxes and with comboboxes in frames. But I don't know how to include the multipage.

Please can someone help me??

Kind regards,
Sophie
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Welcome to the forum.

You would use something like this:

Code:
activesheet.frame1.controls("multipage1").pages(0).controls("combobox1").list = Sheets("Sheet2").range("A1:A5").Value
 
Upvote 0
In this case, it looks like one can also refer to the combobox as follows...

Code:
worksheets("Sheet1").Frame1.Controls("ComboBox1").List = Range("A1:A3").Value
 
Last edited:
Upvote 0
Welcome to the forum.

You would use something like this:

Code:
activesheet.frame1.controls("multipage1").pages(0).controls("combobox1").list = Sheets("Sheet2").range("A1:A5").Value


You are my hero.. works like a charm. Thanks. I really did not know how to combine that..
Sophie
 
Upvote 0
Tried that but I get a "Subscript out of range" error. Probably because of the multipage control which holds the combobox.
 
Upvote 0
It works for me. Did you you add the controls like this...

Design Mode > right-click the Frame > select Frame object > select Edit > add controls using the Toolbox

???
 
Upvote 0
It works for me. Did you you add the controls like this...

Design Mode > right-click the Frame > select Frame object > select Edit > add controls using the Toolbox

???

Yes. That how I added the multipage and than inside the multipage added the combobox. My multipage contains 5 pages.
Anyways. The other option works :) So thank you all.
 
Upvote 0
Welcome to the forum.

You would use something like this:

Code:
activesheet.frame1.controls("multipage1").pages(0).controls("combobox1").list = Sheets("Sheet2").range("A1:A5").Value

You wouldn't possible know how to adress a commandbutton in that same multipage in that frame on that worksheet? :S Double clicking leads to a "Frame1_click()" which I don't want. I'm sure it can be easy.. but I don't see it.
 
Upvote 0
I forgot to reference Sheet2 for your list. And I'm assuming that the sheet references are correct? In any case, Rory has given you a solution that works, so that's great.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,270
Messages
6,171,103
Members
452,379
Latest member
IainTru

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