Dear All ,
I need to create a combo box populated with list of sheets names in the workbook.
Regards
Dear All ,
I need to create a combo box populated with list of sheets names in the workbook.
Regards
Try:
Please Login or Register to view this content.
let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source
If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE
Walking the tightrope between genius and eejit...
Thanks for your help but code you have provided not worked
Yes, it does. Show me how you're trying to use it.
I have run code by paste into VBA Module and when run it nothing happened and no error message
You didn't specify where your combobox is, so I gave you a function which populates a specified combobox. You have to call that function as part of your existing code, and specify the combobox object you are referring to.
For example - if your combobox is on Sheet1, and is called ComboBox1, then you could use:
Please Login or Register to view this content.
i want to create a combo box like this so that when i click menu then it goes to menu worksheet a snapshot is attached
The combo box i have created is on sheet 1
Regards
Last edited by asad.ermo; 08-15-2017 at 09:10 PM.
It's hard to tell, from an image (much better to attach an actual workbook), but I suspect you've inserted a Form Control Combobox. You'd be better using an ActiveX ComboBox, if you intend manipulating it with VBA.
Thanks for your help
I have attached a screenshot of actual workbook
kind Regards
Yes, as I guessed, you've inserted a Form Control Combobox.
On the Developer tab, click the Insert dropdown, and you'll see two sets of controls - Form Controls and ActiveX controls. Because you want to control the ComboBox behaviour with VBA, it's better for you to use the ActiveX control.
Attached file will automatically list all worksheets in workbook in a userform. Double Click will take to selected worksheet. Visible from any worksheet makes for easy navigation
@nigelog That's not what OP asked for, though...
I guess not but someone might find it useful in a multisheet workbook
You're absolutely right - my error!
In which case, the code I posted in #2 and #6 should work just fine:
To activate the selected worksheet, something like this in the worksheet module:Please Login or Register to view this content.
See attached workbook for worked example.Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks