Hi,
I have a UserForm with. When One TextBox (TextBox2) is filled out, I want another TextBox (TextBox4) to autofill based on the results of a Vlookup. This is my first attempt at a "smarter" UserForm.
In the UserForm(Code) window I changed the automatically generated control code for TextBox2 to the following:
What is kind of driving me nuts is: If I change the ,range_lookup to TRUE for "approximate match" the code returns a value from the Vlookup... It is the WRONG value but it returns and populates TextBox4. When the code is run as above I get: Run-time error '-2147352571(80020005)': Could not set the Value property. Type Mismatch.
Being new to UserForms, and knowing that I can make code *like* this work on a sheet I have been frustrated. Current file contains confidential information so I have not posted it. Worksheets("VendorData") column A is a unique Number I am searching for, Column B is the vendor's name that I want returned. I suspect it has something to do with ..._Exit(ByVal Cancel As MSForms.ReturnBoolean) because I truly do NOT understand what that is doing, other than waiting until the user exits the TextBox before running the code.
Thanks in advance.
Bookmarks