Hello all, I am a fairly new VBA user. And I am trying to solve a problem that I have not quite been able to crack yet, but am hopeful that one of you excel experts will be able to help with. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
<o> </o>
Layout<o></o>
1) I currently have a drop down list of unique Customer ID’s on a worksheet called USER_PAGE. <o></o>
2) On a separate worksheet in the same workbook called LEAD_LIST, I have customer data. In particular fields Customer_ID, NAME, SALES_VOLUME, LOCATION <o></o>
<o> </o>
Problem: I want to create a VBA program that will fire when the user selects a customer ID from the drop down list on the USER_PAGE, and based on the customer id that they select, search for all matching customer ids on the LEAD_LIST sheet and then copy over all values that match onto the User page. <o></o>
<o> </o>
<o> </o>
<o>Here is what I have so far. </o>
<o>'Sets variables </o>
<o>Dim LEAD_L As Variant
Set LEAD_L = Worksheets("USER_PAGE").Range("C3")</o>
<o>'Starts the if then conditions.
If Worksheets("LEAD_LIST").Range("A1") = LEAD_L Then</o>
<o>
'THIS IS WHERE I AM STUCK, because the sheet might have customer id's that appear multiple times, and I want it to copy all over all the values and their associated fields and then paste them back onto the USER_PAGE.</o>
<o></o>
<o>'Copies over the entire row</o>
<o>Selection.EntireRow.Copy</o>
<o></o>
<o>End If</o>
<o></o>
Thanks in Advance…<o></o>
<o> </o>
Layout<o></o>
1) I currently have a drop down list of unique Customer ID’s on a worksheet called USER_PAGE. <o></o>
2) On a separate worksheet in the same workbook called LEAD_LIST, I have customer data. In particular fields Customer_ID, NAME, SALES_VOLUME, LOCATION <o></o>
<o> </o>
Problem: I want to create a VBA program that will fire when the user selects a customer ID from the drop down list on the USER_PAGE, and based on the customer id that they select, search for all matching customer ids on the LEAD_LIST sheet and then copy over all values that match onto the User page. <o></o>
<o> </o>
<o> </o>
<o>Here is what I have so far. </o>
<o>'Sets variables </o>
<o>Dim LEAD_L As Variant
Set LEAD_L = Worksheets("USER_PAGE").Range("C3")</o>
<o>'Starts the if then conditions.
If Worksheets("LEAD_LIST").Range("A1") = LEAD_L Then</o>
<o>
'THIS IS WHERE I AM STUCK, because the sheet might have customer id's that appear multiple times, and I want it to copy all over all the values and their associated fields and then paste them back onto the USER_PAGE.</o>
<o></o>
<o>'Copies over the entire row</o>
<o>Selection.EntireRow.Copy</o>
<o></o>
<o>End If</o>
<o></o>
Thanks in Advance…<o></o>