Excel ActiveX Combo Box to Select Worksheets with VBA



You’ll learn how to create a handy navigation combo-box for your Excel workbooks. The ActiveX combobox is automatically filled with the sheet names of your open workbook. If you add sheets, these are automatically added to the drop-down box. Deleted sheets are automatically removed from the combo-box.

You can get the complete Excel VBA and macros course here:

What you learn in this video:

You learn how to work with ActiveX controls in Excel – what “design view” is and how to adjust the properties to ActiveX controls. You also learn how to fill the values of the the drop-down on the fly so the macro is executed without the need to press a button to run it.

You learn about Active X events – how to debug your VBA code and also how to tweak it so it performs better.

🡻 Download the workbook here 🡻

★ Links to related videos: ★
Check out my VBA playlist here:

★★ My Online Excel Courses including VBA ★★

Courses ►

🕮 Excel Resources I Recommend 🕮

✉ Subscribe & get my Excel top 10 formulas e-book for free

Nguồn: https://marishka-moi.com/

Xem thêm bài viết: https://marishka-moi.com/category/cong-nghe

43 Replies to “Excel ActiveX Combo Box to Select Worksheets with VBA”

  1. Hi Leila. Thank you for your video. Very well made. I have a question regarding this topic. If we want to sort the worksheets inside the combo box. How can we do it? Your reply is much appreciated.

  2. Love how you bring up problems that arise, so that the viewers can get a deeper understanding. Awesome video!!

  3. Amazing videos. I am using your version here. I am also trying to create a version where all worsheets are hidden (but ActiveX) and where only the selected combo-box option is unhidden with a button in each worksheet to take me back to ActiveX worksheet. I hope this makes sense 🙂 If you have a tutoral video to help with this… Thank you again.

  4. Hi. Very helpfull tutotial… im wondering is it possible that the drop.down details in the combo box will be arrange alphabetically? Thanks

  5. Hi,
    What to do when user form seems to be doubled? Is it some kind of error in my excel?
    Once form has been created every click on it creates second one that actually is operative.

  6. Thank. How to transfer data to specific sheet same method in userform combobox ?
    i have fixed the sheet name like data (wrote in the algorithm). now I need change instead of data to combobox value. I hope you. Help me..🤔🤔

  7. Dear Sir I have text box in excel sheet I know input breakup detail by macro but I want to Run the macro after press enter key only "after input in text box then press enter key"

    My text box is located in excel sheet not in user form
    Help on this simple vbs project in excel !

    9729638192

  8. Hi Leila, The video is great! I did the exact same one yesterday and the combo box was populated successfully. Today I played with the code a little bit in VBA editor. But later in the day, I tried to open a new excel file and used the exactly the same code by following every step here. However, this time, my combo box just wouldn't populate anything. I tried 3 times this evening but still failed. Any clue?

  9. thank you for this usefull function , is it possible to open the list box ( Active X ) sheet every time we open the workbook.

  10. I already knew this method, but your videos are so well done that I watch them even if (sometimes) they're nothing new for me. I think your explanations are very clear and useful also for Excel beginners.

  11. What if I want the Combo Box to select a few specific sheets? (i.e. not all the sheets in the workbook but just the ones I want)

  12. Hi Leila
    I need one clarification in excel conditional formatting (How to turn conditional formatting cell color into fill color in another cell)
    Please let me know once you found the solution
    Thanks

  13. Thanks Leila, I'm learning very much with your Videos. Since I found your channel I visit it every day. I have an observation, since the the ComboBox is dynamic, what if the user delete the worksheet "Data" that is used at the open event. It´s better to use something like this …

    Private Sub Workbook_Open()

    Dim SH As Worksheet

    temp = ""

    For Each SH In ThisWorkbook.Worksheets

    If SH.Name <> "ActiveX" Then temp = SH.Name

    If temp <> "" Then GoTo salir

    Next SH

    salir:

    If ActiveSheet.Name = "ActiveX" Then

    Worksheets(temp).Activate

    Worksheets("ActiveX").Activate

    End If

    End Sub

  14. Thanks a lot. I was looking for same. In fact, i was using hyperlinks to navigate across sheets but it i was not satisfied.

  15. Does anyone know how to only show a subset of the sheets? I have hidden sheets that I don’t want visible to the end user.

  16. Awesome! Thank you! I recorded macros for hiding my sheets that will only appear when selected from the combobox. Is there a way to have the combo box unhide the sheets then go to them?

  17. Dear Ms Leila,
    How are you and hopefully you are well.

    I am working with VBA macro where I am creating user form of combobox to list some of sheets on my workbook into combobox ( sorry not all). let say I have 6 sheets which are Sheet1, sheet2, sheet3, sheet4, sheet5, sheet6. I wanted sheet2, sheet5 and sheet6 go into combobox.

    Could you please advise me the vba code on this. appreciate your comments.

    FYI I am using the below vba code but all of the sheet went into the combobox but I want only few sheets. below was the vba code :

    Private Sub userform_initialize()

    Dim n As Integer

    Do
    n = n + 1
    CmbReporting.AddItem sheets(n).Name
    Loop Until n = Worksheets.Count
    end sub

    I change the name of combobox become cmbReporting.

  18. Why not populating the combo box at the workbook open event, it’s the same code when activating the sheet just copy/paste instead of running two codes !!

  19. Love your work, excellent teaching and now I use this on all my forms and it works brilliantly. Really Love your work Leila and would like to now learn how to activate more selections from 1 sheet to another.

  20. The bad thing about combo box is that you cant stick it insidethe cell like data validation. You have to program like an engineer just to make combo box do that

  21. What is that? Simply stunning. Brilliant ideas. I fell in love with Excel after seeing such useful tutorials. I do not want to stop learning from you. Thanks

  22. https://drive.google.com/open?id=1pVP9N5l4ANIjhxmIKILnxjDOE3ncKQdb Hi Leila, this link for report dashboard if u open this file which drop down form control in a sheet but I want ActiveX control drop down and how to crate VBA code if file extension is xlsm if other person will be change the extension all data is deleted automatically. Please suggest.
    Thanks
    Vijay

  23. Hi Leila, If you we are analyzing 2 factors like time and temperature, we use a graph to see the effect of time on the temperature. But how can we analyse the data based on 3 or more factors to see their effect. Thanks in advance.

  24. I tried the excercice "Excel activeX Combo Box to select Worksheets with VBA" and at the end you make changes in the workbook. In my excercise there is no workbook present.

  25. Nice!

    Have you thought of adding a function into a module that populates the dropdown?

    Then it can be reused from the workbook load and the sheet activate.

    You just pass "me" from the activate as a parameter to get the context. From the open pass a reference to sheet(1).

  26. There is a tiny problem, example: I have 100 sheets, if I click sheet no# 99 So i can go easily at 99, how can I come back from sheet99 to search sheet . Cloud please…..

Leave a Reply

Your email address will not be published. Required fields are marked *