+ Reply to Thread
Results 1 to 21 of 21

change code of combobox to not duplicate values

  1. #1
    Registered User
    Join Date
    07-16-2013
    Location
    Lisbon, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    25

    change code of combobox to not duplicate values

    Hi people.

    Can anyone help me please? I want that the Combox1 don't show the duplicated values. Thanks

    Please Login or Register  to view this content.

  2. #2
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: change code of combobox to not duplicate values

    See if this works? I added some code that I use for Access.

    Please Login or Register  to view this content.

  3. #3
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: change code of combobox to not duplicate values

    Perhaps this:-
    Please Login or Register  to view this content.

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: change code of combobox to not duplicate values

    Try
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    07-16-2013
    Location
    Lisbon, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: change code of combobox to not duplicate values

    Trabalhadores.xlsm

    Hi. It didnt work. Can u people see the file? i Think its more easier to understand.

    Thanks

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: change code of combobox to not duplicate values

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    07-16-2013
    Location
    Lisbon, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: change code of combobox to not duplicate values

    Quote Originally Posted by jindon View Post
    Please Login or Register  to view this content.
    Sorry. i tried this code but the combox1 continue with duplicated names. can u send me the file with that modification? Thanks

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: change code of combobox to not duplicate values

    See attached.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    07-16-2013
    Location
    Lisbon, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: change code of combobox to not duplicate values

    Hi. isn't working. when i define the range on combobox1 properties, the names apears duplicated.
    see jpegTrabalhadores.JPG

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: change code of combobox to not duplicate values

    Don't touch Combobox property in attached file, just click on C1.

  11. #11
    Registered User
    Join Date
    07-16-2013
    Location
    Lisbon, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: change code of combobox to not duplicate values

    Thank you. its working

  12. #12
    Registered User
    Join Date
    07-16-2013
    Location
    Lisbon, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: change code of combobox to not duplicate values

    One more thing please. i would like to move the two comboboxs to Sheet2 but mantaining the lists in sheet1. What i have to change in code?

    Please Login or Register  to view this content.
    Thanks

  13. #13
    Registered User
    Join Date
    07-16-2013
    Location
    Lisbon, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: change code of combobox to not duplicate values

    Hi. the combobox1 is already working in sheet2, but combobox2 don't work. Can anyone help me? Thanks

    Please Login or Register  to view this content.

  14. #14
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: change code of combobox to not duplicate values

    Sheet2???? where is it?
    Attached Files Attached Files

  15. #15
    Registered User
    Join Date
    07-16-2013
    Location
    Lisbon, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: change code of combobox to not duplicate values

    sorry. i didnt upload the file updated.

    Trabalhadores.xlsm

  16. #16
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: change code of combobox to not duplicate values

    ...................
    Attached Files Attached Files

  17. #17
    Registered User
    Join Date
    07-16-2013
    Location
    Lisbon, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: change code of combobox to not duplicate values

    Thank you.

  18. #18
    Registered User
    Join Date
    07-16-2013
    Location
    Lisbon, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: change code of combobox to not duplicate values

    one more question. please. i would like to have a button in sheet2 to run the Reset combobox1 that is on sheet1

    How can i do it?

    Thanks

  19. #19
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: change code of combobox to not duplicate values

    What for?

    Why on Sheet2?

    That doesn't make sense to me.

  20. #20
    Registered User
    Join Date
    07-16-2013
    Location
    Lisbon, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: change code of combobox to not duplicate values

    Quote Originally Posted by jindon View Post
    What for?

    Why on Sheet2?

    That doesn't make sense to me.
    Because i want to hide the sheet1. i don't want people change that data.

    But i need people have possibility of clean combobox and make a new search.

    I already thought another way, that click in button, the system selects the c1 of sheet1. It works but system shows the moves. i already put screenupdating false, but he shows the moves =/ and stays on sheet1. i want he stays in sheet2

    i have this
    Please Login or Register  to view this content.

    i already tried to change but gives error =/

  21. #21
    Registered User
    Join Date
    07-16-2013
    Location
    Lisbon, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: change code of combobox to not duplicate values

    Hi. Problem solved.

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. change all duplicate values..............
    By sanjoy.dutta in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-15-2013, 10:31 AM
  2. [SOLVED] Option Buttons to Change ComboBox Values Dynamically
    By Stonesteel15 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-03-2012, 11:48 PM
  3. Code to change LinkedCell of ActiveX ComboBox
    By ozhunter in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-08-2011, 07:10 AM
  4. Find ALL WorkSheets according to 2 ComboBox Values.... Help with Code
    By Corey in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-07-2006, 06:35 PM
  5. Create a new chart for every change of values in a combobox
    By uriel78 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 04-06-2005, 03:06 PM

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