• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA: Populate multiple drop-down list (in excel) based on external excel file

Hi,

Filling the combobox list with values from a closed workbook can be done with an ADODB connection using SQL Select statement

Which are the columns with which you need this data

i.e. In the 'File Invoice' file you have posted earlier what is the output you expect and how did you arrive that output


Hello Sathish,

Thank you for your reply.

Luke :awesome:, is helping me out to achieve the functionality and learning good things from him.

Yes, it would be wonderful to know about ADODB connection from you, its a new thing for me :)

Please find attached the 2 files:
1. File Master Data.xlsx
2. File Invoice1.xlsm

The columns needed from File Master Data.xlsx are:
1. Customer Name
2. VAT Number
3. Country
4. City
5. Amount1
6. Amount2
7. Amount4

In File Invoice1.xlsx, the Combobox is physically placed outside the Table.

The criteria for populating the combobox is as follows:
When the user clicks on the combobox, it should populate the rows from 'File Master Data.xlsm' for the current row's Customer and VAT value.

Thanks & regards
Don
 

Attachments

  • File Invoice1.xlsm
    19.2 KB · Views: 1
  • File Master Data.xlsx
    9.6 KB · Views: 1
I think I understand. Modifed my previous file to show combo box when user has selected a cell within table. Dropdown does not take focus automatically. Drop down has information related to active row.


Wonderful, it just works perfect. The display of the combobox being displayed only when the cell is selected in a table, is very nice

Thank you Luke for your help. Just loved it.:)

Regards
Don
 
Hi,

Check out the attached file

Save both files in same location

Note: Only thing I am not able to achieve is displaying the headers in the combobox since this pulls out data directly from database and not from a range in same file
 

Attachments

  • File_Invoice1.xlsm
    24.2 KB · Views: 7
  • File_Master_Data.xlsx
    9.2 KB · Views: 5
Hi,

Check out the attached file

Save both files in same location

Note: Only thing I am not able to achieve is displaying the headers in the combobox since this pulls out data directly from database and not from a range in same file

Hello Sathish,

Thank you for your solution. First impression, looks very good. :):awesome:

Yes, if the column names would have been there, it would be very nice.

Just some thoughts sharing with you (don't know how to to do in code):
1. I saw you have created a Setup worksheet (Master file) which is advantage. Does it use it in the functionality? If not, would be nice, to pick up those columns which the User mentions.

2. To fill up the list when he enters the customer name or VAT (in File Invoice)

3. Column heading would have been really wonderful.

Thanks again, I have learned something new from you today.

Looking forward to hearing from you

Regards
Don
 
Hi,

Check out the attached file

Save both files in same location

Note: Only thing I am not able to achieve is displaying the headers in the combobox since this pulls out data directly from database and not from a range in same file


Hello Sathish,

I am trying to implement your code in the workbook over here, and getting into some trouble.

If you could, please explain me what your code does so I can understand and implement here:).

Many thanks and looking forward to hearing from you

regards
Don
 
I think I understand. Modifed my previous file to show combo box when user has selected a cell within table. Dropdown does not take focus automatically. Drop down has information related to active row.


Hello Luke,

I would like to send you a conversation message, but it says "You may not start a conversation with the following recipient"

Wonder why?

Could you please advise?

Thanks & regards
Donald
 
Hi Don,

To cut down on number of spam requests from new users, who think Ninjas are like a "personal assistant", I have my forums settings set so that only people I follow, or who I've started a conversation with can PM (private message) me. Nothing personal, just a general setting.

I've since started following you, so you should be able to send me a message now. :)
 
Hi Don,

To cut down on number of spam requests from new users, who think Ninjas are like a "personal assistant", I have my forums settings set so that only people I follow, or who I've started a conversation with can PM (private message) me. Nothing personal, just a general setting.

I've since started following you, so you should be able to send me a message now. :)


Hi Luke,

Thank you. Just wondering why I couldn't send message now I know how it works :)

Regards
Don
 
Back
Top