none
Help - Auto Fill Template With Excel Data Base RRS feed

  • Question

  • Hi Everyone,

    I need some help either creating a Macro or specific formula to fill information from another sheet in my workbook.

    Example: I have a database of vehicle (including identification number, vin number).

    I have created drop down list for the following, (CUSTOMER, TYPE OF REPAIR, IDENTIFICATION NUMBER) with a macro on the same page to create a JOB CARD.

    What I am trying to achieve, is once I have selected (customer, type of repair, identification number) and click the CREATE JOB CARD macro button, that is auto fills this information into the template created.

    I know this is probably a bit vague on information, if anyone can help or needs more information to guide me, just let me know.

    Thanks! Emma

    Monday, October 10, 2016 4:19 AM

Answers

  • Hi Emma12345,

    According to your description, you could use DAO or ADO to retrieve data from the database, then fill ComboBox or ListBox, you could refer to Populate Userform ListBox or ComboBox

    After that, you could fill data into Excel Sheet.
    ThisWorkbook.Sheets("SheetName").Range("A1") = Me.ComboBox1.Value

    Disclaimer: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    Thanks for your understanding.
    • Proposed as answer by David_JunFeng Friday, October 14, 2016 9:43 AM
    • Marked as answer by David_JunFeng Monday, October 17, 2016 2:40 PM
    Tuesday, October 11, 2016 2:46 AM

All replies

  • Although you can do it in excel by formula or Macro but I suggest to go for Word Mail Merge Feature.

    You can learn quicker and it is easy to maintain. You can update also whenever you want.

    Mail Merge



    Best Regards,
    Asadulla Javed,
    Jadavpore & Asansol

    Monday, October 10, 2016 3:21 PM
    Answerer
  • Hi Emma12345,

    According to your description, you could use DAO or ADO to retrieve data from the database, then fill ComboBox or ListBox, you could refer to Populate Userform ListBox or ComboBox

    After that, you could fill data into Excel Sheet.
    ThisWorkbook.Sheets("SheetName").Range("A1") = Me.ComboBox1.Value

    Disclaimer: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    Thanks for your understanding.
    • Proposed as answer by David_JunFeng Friday, October 14, 2016 9:43 AM
    • Marked as answer by David_JunFeng Monday, October 17, 2016 2:40 PM
    Tuesday, October 11, 2016 2:46 AM