+ Reply to Thread
Results 1 to 6 of 6

Change code to populate combo boxes with data from tables in a different workbook.

  1. #1
    Registered User
    Join Date
    05-11-2015
    Location
    West Cornwall, UK
    MS-Off Ver
    2010
    Posts
    55

    Change code to populate combo boxes with data from tables in a different workbook.

    Hi Guy's

    Someone helped to write the below code, it populates some combo boxes on a userform, it also allows me (from the userform) to type in a new supplier and it will check to see if it exists, if it doesn’t exit, it gets added to the list.

    The data that populates the combo boxes comes from Tables in a sheet called “Lists” of the same workbook as the userform.

    I have created a new workbook called Payees, I have copied the “Lists” sheet to the new workbook and named that sheet “Lists” also.

    In theory everything is exactly the same other than the tables are now in another workbook called Payees.

    Can someone please help/advise how I should alter the code for it to continue populating the combo boxes and for the Lists to get updated if I enter a non-existent entry.

    The new workbook Payees is Open.


    Please Login or Register  to view this content.
    Thanks for looking.

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

    Re: Change code to populate combo boxes with data from tables in a different workbook.

    All you should really need to do is add a workbook reference for the 'Payee' workbook throughout the code that populates the comboboxes and the code that adds a new supplier.

    You've only posted the existing code for the latter, can you post the code for the former?

    Alsi is the 'Payee' workbook open?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    05-11-2015
    Location
    West Cornwall, UK
    MS-Off Ver
    2010
    Posts
    55

    Re: Change code to populate combo boxes with data from tables in a different workbook.

    Hi Norie,

    Thank you for a quick reply.

    Please see below the code that populates the combo boxes.

    Thank you again for looking.



    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    05-11-2015
    Location
    West Cornwall, UK
    MS-Off Ver
    2010
    Posts
    55

    Re: Change code to populate combo boxes with data from tables in a different workbook.

    I understand that I will need to reference the workbook then the the worksheet. I have spent most of the afternoon searching the web and trying all sorts of combinations of code, it has become obvious that I don't understand "how" to code the reference to the workbook.

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

    Re: Change code to populate combo boxes with data from tables in a different workbook.

    Is the workbook you've moved the lists to open or not?

  6. #6
    Registered User
    Join Date
    05-11-2015
    Location
    West Cornwall, UK
    MS-Off Ver
    2010
    Posts
    55

    Re: Change code to populate combo boxes with data from tables in a different workbook.

    Yes, the Payees workbook is open.

+ 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. [SOLVED] Using Multiple Combo Box Values to populate a cell (Excluding blank combo boxes)
    By mnadamn19 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-10-2016, 08:38 PM
  2. [SOLVED] Using Multiple Combo Box Values to populate a cell (Excluding blank combo boxes)
    By mnadamn19 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-10-2016, 10:49 AM
  3. Using Multiple Combo Box Values to populate a cell (Excluding blank combo boxes)
    By mnadamn19 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-07-2016, 03:45 PM
  4. Where to populate Combo Boxes
    By andrew c. in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-14-2011, 06:55 PM
  5. Inter-relating Combo Boxes in Userforms based on data in tables
    By Smurlos in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-04-2009, 04:41 PM
  6. Best way to populate worksheet from 2 combo boxes
    By jswasson in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-07-2006, 08:25 AM
  7. [SOLVED] Combination of 2 combo boxes to populate 3rd
    By AJ in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-31-2005, 07:06 PM

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