+ Reply to Thread
Results 1 to 18 of 18

Can I use a combo box instead of a command button?

  1. #1
    Registered User
    Join Date
    01-07-2013
    Location
    Cluj-Napoca, Romania
    MS-Off Ver
    Excel 2007
    Posts
    10

    Can I use a combo box instead of a command button?

    Hello, I have a big file with 45 sheets, and i created a Menu sheet, where I put Command buttons that send you to the needed sheet - however, I got the "subscript our of range" error, even if everything seems to be OK with the code line. Can it be because there are so many sheets in the file? The sheets can be put into 5 big categories - could I have instead of 45 command buttons just 5 combo boxes, from where the sheets can be selected?

  2. #2
    Valued Forum Contributor
    Join Date
    09-04-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    463

    Re: Can I use a combo box instead of a command button?

    can u upload a sample file so that i can understand properly what u want and i can help you.
    Regards
    CA Mahaveer Somani

  3. #3
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Can I use a combo box instead of a command button?

    if you have a subscript error it is most likely that one of the sheet names is incorrect. you could use comboboxes and use their change events to select the sheet
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  4. #4
    Registered User
    Join Date
    01-07-2013
    Location
    Cluj-Napoca, Romania
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Can I use a combo box instead of a command button?

    Thank you for your quick replies. I have attached a sample file to this message, so that everything is clearer. thanks a lot.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-07-2013
    Location
    Cluj-Napoca, Romania
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Can I use a combo box instead of a command button?

    Quote Originally Posted by JosephP View Post
    if you have a subscript error it is most likely that one of the sheet names is incorrect. you could use comboboxes and use their change events to select the sheet
    Thank you for your quick reply. Unfortunately this is not the reason for my error, I have checked and double checked the sheet names.

  6. #6
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Can I use a combo box instead of a command button?

    I don't get a subscript error with that file

  7. #7
    Registered User
    Join Date
    01-07-2013
    Location
    Cluj-Napoca, Romania
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Can I use a combo box instead of a command button?

    It would be too difficult to send the entire file, as there would be a lot of confidential data that i have to take out of it, to be able to show the error. My question was if I could use a combobox as shown in the sample file instead of the command buttons. In my big file i would have 45 command buttons, and that seems a little too much. Thank you again for your support.

  8. #8
    Valued Forum Contributor
    Join Date
    09-04-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    463

    Re: Can I use a combo box instead of a command button?

    what do you want with the 5 combobox? describe

  9. #9
    Registered User
    Join Date
    01-07-2013
    Location
    Cluj-Napoca, Romania
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Can I use a combo box instead of a command button?

    When selecting one item in the combo box, I want to activate the respective sheet, just like the command buttons do now. Aside from the error, I got complaints that the big number of buttons was confusing

  10. #10
    Valued Forum Contributor
    Join Date
    09-04-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    463

    Re: Can I use a combo box instead of a command button?

    check the file and tell me do you want to do like this?

    Regard
    CA Mahaveer Somani
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    01-07-2013
    Location
    Cluj-Napoca, Romania
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Can I use a combo box instead of a command button?

    Yes, that is exactly how I want to do this. Basically, now i just have to adapt the code to my needs. Thank you very much for your help.

  12. #12
    Valued Forum Contributor
    Join Date
    09-04-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    463

    Re: Can I use a combo box instead of a command button?

    open my last attached file then press Alt+F11
    there you will get my code.

    if you required further help then tell me otherwise hit the solved thread....

    Regards
    CA Mahaveer Somani

  13. #13
    Registered User
    Join Date
    01-07-2013
    Location
    Cluj-Napoca, Romania
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Can I use a combo box instead of a command button?

    Yes, I have seen the code, it's OK, I will mark this as solved.

  14. #14
    Valued Forum Contributor
    Join Date
    09-04-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    463

    Re: Can I use a combo box instead of a command button?

    thats nice...

    glad to help you dear

    Regards
    CA Mahaveer Somani

  15. #15
    Registered User
    Join Date
    01-07-2013
    Location
    Cluj-Napoca, Romania
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Can I use a combo box instead of a command button?

    Thanks for the help with the combo box yesterday, it worked, but not completely. Please find attached a sample of the whole file - see in the last combo box, Simulation Impact, only two of them work. I do not get any error message, they simply do not work. Do you have any idea what i might have done wrong?
    Attached Files Attached Files

  16. #16
    Valued Forum Contributor
    Join Date
    09-04-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    463

    Re: Can I use a combo box instead of a command button?

    check the attached file

    then tell me if there is any another problem dear cosimna bereschiu

    Regard
    CA Mahaveer Somani
    Attached Files Attached Files

  17. #17
    Registered User
    Join Date
    01-07-2013
    Location
    Cluj-Napoca, Romania
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Can I use a combo box instead of a command button?

    Now it works. I saw that the sheet names had a little issue with a space at the end of their name. Thanks for your help.

  18. #18
    Valued Forum Contributor
    Join Date
    09-04-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    463

    Re: Can I use a combo box instead of a command button?

    yes you got the major issue yourself........ha ha ha.....very nice dear....

    Glad to Help You....

    Regards
    CA Mahaveer Somani

+ Reply to 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