- Jan 2, 2019
- Office Version
Hello all! I'm trying to create a UserForm where it shows data from the ActiveCell that I've selected in the respective worksheet, but I'm struggling with an error for the VLookUp formula in it. Can somebody tell me what I'm doing wrong in here please? Much thanks in advance!
Private Sub UserForm_Initialize() Dim Desc As Variant Dim ACell As Variant Dim shtRList As Worksheet Set shtRList = Sheets("REFList") ACell = ActiveCell.Value Desc = Application.VLookup(ACell, shtRList.Range("A:B"), 2, False) Label1.Caption = ACell Label4.Caption = Desc End Sub