open specific sheet with click button userform

  • hello helpers,


    as you can see inside my attached document.
    i have a user form where you can select various ship yards by name and with every yard you have various numbers of hull numbers to select.
    i have to fill the document with all the hull numbers on extra new sheets.


    ending up with a excel with 100 +sheets.


    as you can see i have added a click button on the userform.


    my final question to you all is there a VBA code.


    that will open/show the specific sheet(hull number) that you can select in combobox 2??


    thank you for your help.

  • Re: open specific sheet with click button userform


    Change your command button code to:


    HTH
    Ger

    _______________________________________________
    There are 10 types of people in the world. Those that understand Binary and those that dont. :P


    Why are Halloween and Christmas the same? Because Oct 31 = Dec 25... ;)

    _______________________________________________

  • Re: open specific sheet with click button userform


    thank you ger plante


    Code
    Private Sub CommandButton1_Click()
    
    
    ActiveWorkbook.Sheets(ComboBox2.Value).Activate
    
    
    Unload UserForm1
    
    
    End Sub


    worked perfect.

  • Re: open specific sheet with click button userform


    :cool:

    _______________________________________________
    There are 10 types of people in the world. Those that understand Binary and those that dont. :P


    Why are Halloween and Christmas the same? Because Oct 31 = Dec 25... ;)

    _______________________________________________

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!