Results 1 to 20 of 27

Thread: Solved: Populate a comboxbox and Listbox in a excel userform with an sql table data

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #15

    Populate a comboxbox and Listbox in a excel userform with an sql table data

    Hi Tinbendr,

    Brilliant. You are just awesome. I have tried the sql statement provided by you in my code in the below way and It worked exactly as I wanted.

    stSQL = "SELECT DISTINCT CONVERT(VARCHAR(50), Region) FROM Region_Mapping"
    Now can you please provide me with an example code which works for the below i.e .
    to populate list box on the basis of Combobox selection. Suppose user selects Americas in combo box then it should show only countries of America .i.e Argentina, Brazil, Mexico etc. (which are mentioned against Americas region in country column in same sql table).

    Thanks a lot once again.


    Last edited by Aussiebear; 04-19-2023 at 02:10 PM. Reason: Adjusted the code tags

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •