+ Reply to Thread
Results 1 to 13 of 13

Multiple Combo Boxes

  1. #1
    Forum Contributor
    Join Date
    09-09-2009
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    185

    Multiple Combo Boxes

    Hi,

    Okay, I did away with the merged cells, and now I have a combo box in every cell that I want it in.

    My problem is, I would like to format each combo box seperately. Every cell that has a combo box in it has data vakidation activated. I copy and pasted code to get it to work. It works great, but I would still like to change the combo box size and tab and enter functions for each individual one. I created more than one combo box but I kept getting an error on them. Any help or knowledge would be greatly appreciated.

    I am posting just the code that I copy and pasted.

    Please Login or Register  to view this content.
    Thank you in advance.
    Last edited by whatsmyname; 09-21-2009 at 10:02 PM.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Combo Box With Merged Cells?

    Hi,
    can't help you with the combo boxes, but merged cells are BAD BAD BAD and should be avoided because they lead to all kinds of problems. Instead use the formatting option to "Center across selection" in the Horizontal options of the Alignment tab.

  3. #3
    Forum Contributor
    Join Date
    09-09-2009
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    185

    Re: Combo Box With Merged Cells?

    Thank you,

    But, could you explain a little further by what you mean about formatting, please?

  4. #4
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Combo Box With Merged Cells?

    OK. More often than not merged cells are used to achieve the "look" of a cell spreading across several columns. Say you want A1, B1 and C1 to look as if it's one cell with some text in it. One way is to merge the three cells. But that can lead to all sorts of trouble, for example when you later change the layout of the workbook and want to add a new column between A and B, you first have to unmerge the cells.

    As an alternative to merging, select cells A1, B1 and C1, click Format - Cells, select the Alignment tab and in the dropdown box for Horizontal choose the option "Center across selection" Now your text in cell A1 is centered across the three columns. You can put a nice border around A1:C1 and they look like one cell. But they still are separate and you can insert columns without having to undo anything first.

    HTH

  5. #5
    Forum Contributor
    Join Date
    09-09-2009
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    185

    Re: Multiple Combo Boxes

    Okay,

    I got the formatting of cells figured out. and now I have my combo box working. The problem now is that I have a combo box in every data validation cell that I have. I want that but I also want to be able too size and set the different settings to each individual combo box for each data validation cell that I have.

    Any help would be greatly appreciated!!

    Thank you all!

  6. #6
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Multiple Combo Boxes

    Hi Whatsmyname
    can you please edit and add code tags to script in your first post as it makes the code easier to read?
    Place ['code] then the script ['/code] at the end
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  7. #7
    Forum Contributor
    Join Date
    09-09-2009
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    185

    Re: Multiple Combo Boxes

    Okay,

    Pike, I am sorry about that. I believe that I have done it the proper way. I hope that helps.

    Thank you for your help.

  8. #8
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Multiple Combo Boxes

    whatsmyname
    To
    change the combo box size and tab and enter functions for each individual one
    In vb editor switch the "Design Mode"
    then in the work sheet Right click on Combobox and select View Properties.
    This is where custom setting are made. Or is there a pattern to the changes?
    Last edited by pike; 09-22-2009 at 05:20 AM. Reason: spellin?

  9. #9
    Forum Contributor
    Join Date
    09-09-2009
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    185

    Re: Multiple Combo Boxes

    Well,

    The thing is, is that I have multiple data validation cells. I want a combo box on each of these cells. But, I also want to be able to enter a specific size and enter and tab action setting for each combo box individually. I copied the code off of a contextures website. So, when it comes to the code that I have written, it might not be the best code to use.

    Right now I only have 1 combo box. I can set the size and enter and tab actions with the code that I have in there now. But, when I go and add another combo box, I do not know how to add that specific code for that specific combo box.

    I'm sorry that I am not that educated on these things. I do have a very basic idea of how this all works but basically my knowledge on this stuff is pre-k.

    Thank you for your help now and in the future. I hope that I explained everything thoroughly enough that you can understand what I am trying to do.

    Thank you.

  10. #10
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Multiple Combo Boxes

    How have you named the combo boxes

  11. #11
    Forum Contributor
    Join Date
    09-09-2009
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    185

    Re: Multiple Combo Boxes

    Yes I did. I have only a max of 2 combo boxes though. I actually have about 5 that I need to do. The reason why I haven't done more than 2 is because I can not get the second combo box to work on it's own. So I didn't want to put of a "mess" on the worksheet. I think my problem is in the code that I put in VB editor. I have tried to make another combo box and copy the code that I already have in VB, and just change the name's that are in there. It still did not work though. Unless you think I'm doing something wrong?

  12. #12
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Multiple Combo Boxes

    do you have a sample workbook that you can attach?

  13. #13
    Forum Contributor
    Join Date
    09-09-2009
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    185

    Re: Multiple Combo Boxes

    The file is to big to post. The code that I am using is in the first post of this thread. If that helps out at all. Is there anything else that I can do?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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