Excel VBA USERFORMS #7 Lookup Status and Favorite Color on Combobox Click!

preview_player
Показать описание

Fantastic Developer Tools:
Рекомендации по теме
Комментарии
Автор

Hi dan, here is a tip to get the name range if you don't know it. Change the worksheet zoom to 19% or lower and by default it will show all named ranges within that worksheet

excelsocallmaster
Автор

Vey useful function Vlookup, great video. Thanks Dan.

aircooledcondenser
Автор

OK, here's the thing.  At least in Excel 2007.
The 1st column must be formatted as TEXT. 
A tip here: if you just select the column and change the format from numbers to text, you may notice the runtime error still. 
In each cell, hit F2, then hit ENTER. 
This seems to be because the although you are changing the format of the cell, the contents do not "take" until they are selected in the formula bar and accepted again.
Great videos!
P.S.  I have this working with the code identical to the video, not as MYJETGO posted.

bobbymacisontv
Автор

Merry Christmas everyone. I hope God blesses you richly this upcoming year. Remember, you ARE a success!! Believe it, be it! Blessings my friends!! Dan

ExcelVbaIsFun
Автор

Hmmm. . . Brian, have you tried a vlookup using a regular worksheet vlookup on a sheet without any VBA? If this works but the vba vlookup doesn't, it may mean that the syntax is wrong or maybe a comma here or a quotation mark there or parentheses is off. I'd be glad to take a look if you still need me after testing this. Thanks!! Dan

ExcelVbaIsFun
Автор

Thanks for the response Dan. I have been doing VLookups with formulas for a while now and have started this past week with vba VLookups using cell references. However, it is an issue with the user form VLookups.. I have spent a few days just comparing your sample workbooks with my own and can't figure it out!! haha. Would you mind taking a small look at my workbook?? I have a dropbox link set up that I could send you. Just let me know! Thanks

Bzini
Автор

Hello Danny/Folks, I've been having the same runtime error with my vlookup code as well for this particular lesson but just in case it helps anyone else try this altered version of the vlookup code line.

Me.lblstatus = Application.WorksheetFunction.VLookup(Me.lblEmp, Range("EmpList"), 4)

Where it's altered above allowed the userform to function correctly for me. Also, the ID numbers need to be convered to text.

Great videos Dan!!! Keep them coming please.

MYJETGLO
Автор

I guess Youtube won't allow me to paste a link to these comments. I had to send it to your ExcelVbaIsFun account. Let me know if you haven't seen anything. Brian

Bzini
Автор

great, you are great, you upload 56 videos for userform, genius, what about if you please, please dedicate also a bunch of videos about loops, thanks, you are great, and help me a lot.

no
Автор

Dan, I keep getting a error with my vlookup. I have a dynamic range for my data table (verified it is working) and have put it in the brackets like you said but keep getting an error saying, "Unable to get the Vlookup property of the worksheetfunction class". Do you know what this might mean?? My line looks just like yours so I am just stumped.

Bzini
Автор

I am getting the same error as Brian. I checked every line and as far as I can tell it matches exactly . the VLookup function works fine on the sheet, but not as VBA. I can not figure it out, just started learning VBA.


roblebeau
Автор

hello I need help in the last passage where you insert the two labels for status, the Vlookup function does not work because the following message appear: ERROR RUN TIME 1004 and below it says it is impossible to find the vlookup property

crazyc
Автор

Hi, I too am getting runtime error when it tries Vlookup.  I've tried changing Column A to text, general and numbers. Not fixed.  Then I tried instead of a named range, a static address range.  Not fixed.  I step through the code and it appears the variable lblEmpID is attained.  But the vlookup cannot find a match. 

bobbymacisontv
Автор

ok, I changed row A to text .... and the problem went away...

roblebeau