Closed Thread
Results 1 to 17 of 17

Combo Box with Clickable Different Sheets!

  1. #1
    earthworm
    Guest

    Lightbulb Combo Box with Clickable Different Sheets!

    HI Guys ,

    This is my first post in this forum . I have joined here with a great expectation. I used the Forum MR Excel , i posted my question there but no one replied . I hope i will get the answer to my question here. My question is

    I Have Combo box

    When i click on it i get three Things which i have inputed in the list .

    1 ) Machine
    2 ) Car
    3 ) Bike

    With each list , a seperate sheet is assign with complete details like machine for machine sheet , car for car sheet and bike for bike sheet .

    Now what i want is when i click on the machine i want the Machine sheet to popup within the same workbook , and when i click car i want the car sheet to popup and same for Bike .

    PLEASE HELP ! ! !


    I tried to Assign Macro , but for each list , i am getting the same / last result

    here is the code

    Please Login or Register  to view this content.
    Last edited by earthworm; 05-31-2009 at 03:17 AM.

  2. #2
    Registered User
    Join Date
    05-20-2009
    Location
    NY
    MS-Off Ver
    Excel 2003
    Posts
    57

    Re: Combo Box with Clickable Different Sheets!

    Try adding a ComboBox to Sheet1 (View -> Toolbars -> Control Toolbox
    Then Sheet2 can be renamed to Machine
    Sheet3 can be renamed to Car
    and Sheet4 can be renamed to Bike

    Then open up the VB editor:

    Under ThisWorkbook (Workbook Open Event) you can add items to your ComboBox.
    Please Login or Register  to view this content.
    and under Sheet1, you can add code to your ComboBox and select Change Event

    Please Login or Register  to view this content.
    See attached Book1.xls
    Attached Files Attached Files

  3. #3
    earthworm
    Guest

    Re: Combo Box with Clickable Different Sheets!

    I m trying it in excel 2007 its not working

    i copy the same code as it in in another workbook

    it says

    " cannot run the Macro " All in One 6.0.xls'!Dropdown4_change'.The Macro may not be available in this workbook of all macros may be disabled."

    Please check the excel which i did

    i copy whatever code was mention but with minor changes according to my needs
    Attached Files Attached Files
    Last edited by earthworm; 05-31-2009 at 05:36 AM.

  4. #4
    Registered User
    Join Date
    05-20-2009
    Location
    NY
    MS-Off Ver
    Excel 2003
    Posts
    57

    Re: Combo Box with Clickable Different Sheets!

    Hi,

    I downloaded your file, and the only thing I changed was drawing my own ComboBox on the form - maybe because I am using 2003 and it is slightly different than using yours. Click on the ComboBox and see what other events might be acceptable (but you definitely would want to go with ComboBox some sort of change event, I don't exactly).

    Also, please be sure to enable macros if a security warning pops up when you first open up the file, or you may have to change your security settings in Excel.

  5. #5
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161

    Re: Combo Box with Clickable Different Sheets!

    You say you are working in xl2007 but posted a 97-2003 format workbook, please post the .xlsx file so we can better help you with this problem.
    Not all forums are the same - seek and you shall find

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,430

    Re: Combo Box with Clickable Different Sheets!

    Your control is from the Forms toolbar rather than the Controls Toolbox toolbar.

    Place this in a standard code module.
    Please Login or Register  to view this content.
    And assign DropDown4_Change to the OnAction property.
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  7. #7
    earthworm
    Guest

    Re: Combo Box with Clickable Different Sheets!

    Quote Originally Posted by Andy Pope View Post
    Your control is from the Forms toolbar rather than the Controls Toolbox toolbar.

    Place this in a standard code module.
    Please Login or Register  to view this content.
    And assign DropDown4_Change to the OnAction property.
    OK u mean to say that i will be using this code in excel 2007, and for excel 2003 the person who gave me the code was correct right ?

    Also one more thing

    I didnt understand the concept of drop down change . How do u get one ?
    i m lost

    also please also tell me one thing . I want 6 combo box in one sheet and then link each combox with another how will i achieve that ?

    if i am correct , u have used only one code which is assigned to that combo box , and its very easy i m sure , but i cant figure it out , is it a marco or what , how do u got this

    did u record the macro or something ?
    Last edited by earthworm; 05-31-2009 at 09:14 AM.

  8. #8
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,430

    Re: Combo Box with Clickable Different Sheets!

    The workbook will work in xl2003 and xl2007.

    If you are refering to the first code you posted all that did was select sheet2 and then immediately select sheet3. What the person who gave you that thought it was doing I have no idea, you would have to ask them.

    If you select the control and right click. Pick Assign Macro. The deault macro name is a combination of shape name and event. For a combo box the event is change. I just accepted the default macro name but you can call the macro whatever you want.

    In what way are the comboboxes linked? There are many examples on the forum of linked combo boxes.

  9. #9
    earthworm
    Guest

    Re: Combo Box with Clickable Different Sheets!

    Quote Originally Posted by Andy Pope View Post
    The workbook will work in xl2003 and xl2007.

    If you are refering to the first code you posted all that did was select sheet2 and then immediately select sheet3. What the person who gave you that thought it was doing I have no idea, you would have to ask them.

    If you select the control and right click. Pick Assign Macro. The deault macro name is a combination of shape name and event. For a combo box the event is change. I just accepted the default macro name but you can call the macro whatever you want.

    In what way are the comboboxes linked? There are many examples on the forum of linked combo boxes.
    Ok sorry to bother u , after i click assign macro i got the default name " DropDown4_Change " and Macros in " This Workbook " now what ? what should i click , u need to tell me each and every click u do after that ....

    waiting shall i press record or what ?

  10. #10
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,430

    Re: Combo Box with Clickable Different Sheets!

    When assigning a macro to the control if you already have the code written you can pick it from the list of macros available.
    If not then either use the name provided or type your own. Then click new.
    The will create an empty macro with the name you provided. Now you have to create code in the routine to do whatever you want.

    If you are trying this in the workbook you posted then you will have problems as it contains code that generates errors. Start by removing all code or from a new workbook.

  11. #11
    earthworm
    Guest

    Re: Combo Box with Clickable Different Sheets!

    Quote Originally Posted by Andy Pope View Post
    When assigning a macro to the control if you already have the code written you can pick it from the list of macros available.
    If not then either use the name provided or type your own. Then click new.
    The will create an empty macro with the name you provided. Now you have to create code in the routine to do whatever you want.

    If you are trying this in the workbook you posted then you will have problems as it contains code that generates errors. Start by removing all code or from a new workbook.
    Lets get straight , i m completely . Lets do a crash course.

    I Copied the code which u gave to the macro to the combo box its working like a charm .

    Now my second required .

    I want the second Combox box in the same sheet which also links to another sheets and so on and so forth . its not working , i even changed the macro name to anything but still nothing is happening . only list is selected but not jumping to sheet
    Last edited by earthworm; 05-31-2009 at 09:37 AM.

  12. #12
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,430

    Re: Combo Box with Clickable Different Sheets!

    Why are you copying the code?
    All you need to do is assign the same macro to other controls.

    The code will use the value of the control and go to that sheet named in the list.

    Why do you keep quoting previous threads? You only need to do that if there is something in it that you want to highlightor point out.

  13. #13
    earthworm
    Guest

    Re: Combo Box with Clickable Different Sheets!

    ok can u make an excel and share here ... waiting ..please

  14. #14
    earthworm
    Guest

    Re: Combo Box with Clickable Different Sheets!

    Thank you Andy Pope

    U r Truely a Hero ! ! ! No Doubt i search for this googling for atleast 1 Month but couldnt find the answer and u solved my problem in a day .

    HAIL TO YOU !

    One more thing i would like to know from you.

    I asked the question from you and provided me the answer .

    How did u know that , that particular vb code will solve my issue.

    Are these codes preinstalled in excel , if one more to do more how can he discover which function is assign to which user requirement ?

  15. #15
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,430

    Re: Combo Box with Clickable Different Sheets!

    "How did u know that , that particular vb code will solve my issue."

    I've been doing this for a while. The codes are not preinstalled, they have to be written from scratch.

    In order to learn you have to study. That can be by doing, reading books, attending training sessions. Me personally I read and then try doing then read some more

  16. #16
    earthworm
    Guest

    Re: Combo Box with Clickable Different Sheets!

    Quote Originally Posted by Andy Pope View Post
    "How did u know that , that particular vb code will solve my issue."

    I've been doing this for a while. The codes are not preinstalled, they have to be written from scratch.

    In order to learn you have to study. That can be by doing, reading books, attending training sessions. Me personally I read and then try doing then read some more

    can u please share the book

    i also have many books but that go over my head

  17. #17
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,430

    Re: Combo Box with Clickable Different Sheets!

    there have been many suggested on the forum.
    Here is a recent one
    http://www.excelforum.com/excel-gene...-in-excel.html

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1