I need the value in textbox (txtMailTo) to autpopulate the vendor address when the selection in the combobox(cmbVendor) is selected. I have a worksheet(VLookup) with four columns ("A2:D12"). Column A is the Acct number, I need to be able to input a number as the clients account number rather than the tax id or social security number that would come from the lookup worksheet.
Column "B" is the vendors name, Col. "C" is the vendor address and Col. "D" is the City, State, and Zip Code. TextBox(txtMailTo) for the Street Address, ComboBox which has the vendors name in the dropdown list and Textbox(VendorLoc) for the City, St, and zip.
My code for the event change is: Private Sub cmbVendor_Change()
With Me
.txtMailTo = Application.WorksheetFunction.VLookup(Me.cmbVendor, Sheet5.Range("A2:D12"), 2, False.
I think the problem has something to do with this ,2, False, although I'm not sure.
Guidance would be greatly appreciated.
Column "B" is the vendors name, Col. "C" is the vendor address and Col. "D" is the City, State, and Zip Code. TextBox(txtMailTo) for the Street Address, ComboBox which has the vendors name in the dropdown list and Textbox(VendorLoc) for the City, St, and zip.
My code for the event change is: Private Sub cmbVendor_Change()
With Me
.txtMailTo = Application.WorksheetFunction.VLookup(Me.cmbVendor, Sheet5.Range("A2:D12"), 2, False.
I think the problem has something to do with this ,2, False, although I'm not sure.
Guidance would be greatly appreciated.