• 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.

Populate dropdown list, lookup and create pdf in VBA

saamrat

Member
Hi,

Please help me to solve the issue.
Data sheet has all the master data. Dropdown list to be populated from the master data with a searchable option. columns to be filled correspondence to the selection of dropdown list. on click of button, pdf to be created. This can be achieved using Vlookup. But I am looking for a VBA solution.

Sample sheet attached. Kindly help.
 

Attachments

  • Quote Sample.xlsm
    14 KB · Views: 8
Welcome to the forum!

There are two methods that I generally use for this:
1. Do usual data validation for pick list from a dynamic range which updates the other data with vlookup(). Then have a macro command button to generate the pdf.

2. Use a worksheet Selection event or command button to show a userform. It would use a combobox for the column A picklist and a commandbutton to print the pdf. I would still use the standard vlookup() but the userform code could fill those as well.

I would go with method (1) if it were me.

It would get tedious doing many entries using method (2) alone. The userform could be shown as modeless so the user could select a row and reflect that row in the userform.
 
Does this help?
Keep the excel file in the same folder as the Quotes (PDF) folder.
 

Attachments

  • Quote.zip
    33.3 KB · Views: 18
Does this help?
Keep the excel file in the same folder as the Quotes (PDF) folder.
I really appreciate your help.
I am trying to achieve the result same as in the attached excel sheet. There are hidden sheets for the purpose of getting searchable dropdown list.
I wonder, is there any other I could achieve this (searchable dropdown) in excel vba.
 

Attachments

  • Quote_Demo.xlsm
    122.6 KB · Views: 15
saamrat
Hint:
- You could give more detail information
- You could explain other ways, what?
- Have You checked that eg Your upload file is as clear as possible for others?
... then You could get replies.
No help .... won't help anybody!
 
Cross-posted: https://www.ozgrid.com/forum/forum/...te-dropdown-list-lookup-and-create-pdf-in-vba

Post #4 gave you a way to do it using an autofilter method. This is a good way to go since you have duplicate items. If you had unique items, the file that you posted in # 5 would suffice. It only inserts one item on 3 lines. That does not match your data setup in # 1.

Post #4 also has a userform that is almost complete. I think it was an attempt to build the invoice items from a drop selection. That approach can be successful for you I suspect. Another method is to use a userform but the items would be selected from a listbox. It could then use the filter method to build the invoice.
 
saamrat
You should reread forum rules:
 
Back
Top