+ Reply to Thread
Results 1 to 14 of 14

2 comboboxes can one be turned off

  1. #1
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    2 comboboxes can one be turned off

    hi
    son a userform i have 2 comboboxes both are populated with the same data,one is for night work the other for day shift can i ,if i select day shift combobox can the other box be automatically made invisible or hidden with no data available until the form is closed ,and reappear when the form is reopened again
    cheers colin
    Last edited by cfinch100; 01-20-2013 at 06:39 PM.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646

    Re: 2 comboboxes can one be turned off

    Colin

    It should be possible, but are 2 comboboxes really needed?

    Couldn't you have a checkbox, or something similar, that indicates night work/day shift?
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    Re: 2 comboboxes can one be turned off

    hi norie
    had thought that myself but was not very good at coding it, got into all sorts of problems ,so went with the 2 combos instead , ive had checkboxes,option buttons and tried toggle buttons all to no avail as coding not good enough
    cheers colin

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: 2 comboboxes can one be turned off

    Hi finch100

    Post your Workbook, including the UserForm and any Code you currently have (whether or not it works). Explain what it is you wish to do...perhaps one of us can help you with the Code.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  5. #5
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    Re: 2 comboboxes can one be turned off

    hi
    userform1 has 2 comboboxes that use same data and they populate textbox18 and textbox13 which in turn adds the extra money into tb19,thinking about it textbox18 and textbox13 could be combined and other deleted ,the idea is i can enter either night shift or day shift crane which has different prices tb18 and tb13 are 1 off charges,if you enter say 2 in hrs everything is calclated in txtweektotal and then when saved goes to mfr list sheet hope this explains, prob be better as norie suggested instead of 2 combos use 2 checkboxes
    cheers colin
    Attached Files Attached Files

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: 2 comboboxes can one be turned off

    Hi cfinch100

    I'm only guessing what you wish to happen...see if this is in the same Country let alone State...City...Neighborhood...

    PS: I see you've modified the Attribution...thank you...I appreciate it.
    Attached Files Attached Files
    Last edited by jaslake; 01-20-2013 at 05:30 PM.

  7. #7
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    Re: 2 comboboxes can one be turned off

    hi
    yes that looks like what is needed thankyou , i have just deleted textbox18 and transferred data to textbox13 and called it setup costs as this is a one off cost and seems to work great,only one thing if i start from mfr userform put 22 in ainscough ref it comes up with 100t where it should be a 22===== no,its looking at prices instead of mfr could i set use something like set focus to always point to mfr sheet
    thanks very much for your help
    cheers colin

  8. #8
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: 2 comboboxes can one be turned off

    Hi Colin

    If we're talking about the same file I get 4 instances of 22 in frmMFRSA but then, you may be looking at a different file. To answer your question directly
    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    Re: 2 comboboxes can one be turned off

    hi
    yes looks like same file.
    ive tried it again and it seems to happen if i look at the prices sheet and then save before closing app.
    when i open up again and enter click search,the first entry shows as 100t but the listbox is as it should be.
    could it be saving prices sheet when closing and looking at that first before reverting to mfr.
    how can i stop this happening or just make sure mfr sheet is activated when closing

    thanks for help will mark as solved for earlier problem
    cheers colin
    hope this is better
    Last edited by cfinch100; 01-20-2013 at 06:38 PM.

  10. #10
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: 2 comboboxes can one be turned off

    Colin...use punctuation in your sentences...I can't tell where one thought ends and another begins. I'm 72 years old...humor me.

  11. #11
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    Re: 2 comboboxes can one be turned off

    amended no 9 hope reads better
    cheers colin

  12. #12
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: 2 comboboxes can one be turned off

    Hi Colin

    Sorry...don't want to think that hard!

    Is this the message you're talking about?
    22's found.jpg

  13. #13
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    Re: 2 comboboxes can one be turned off

    hi
    no that works now
    startup program ,run frmmfrsa
    in ainscough ref enter 22,click search
    in ainscough ref it says 100ton it should be a number starting with 22,
    it says 4 instances of 22
    this only seems to do this if the last sheet you look at before saving and closing is prices sheet
    if you save and close after looking at frmmfrsa sheet last it works fine
    cheers colin

  14. #14
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: 2 comboboxes can one be turned off

    You're welcome...glad I could help. Thanks for the Rep.

+ 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