Wardylewis
New Member
- Joined
- Jun 7, 2016
- Messages
- 37
Good evening,
I attempting to use a Vlookup as to provide me with a yes-no answer and then use that to lock out a box if the answer is "No".
I need to define the sheet as it will be hidden to the user as they input data on a Userform.
However, every time I run this code I get a run-time error '1004': Unable to get the Vlookup property of the WorksheetFunction Class.
I've googled everything but cannot seem to fix it, can anybody assist please?
I attempting to use a Vlookup as to provide me with a yes-no answer and then use that to lock out a box if the answer is "No".
I need to define the sheet as it will be hidden to the user as they input data on a Userform.
However, every time I run this code I get a run-time error '1004': Unable to get the Vlookup property of the WorksheetFunction Class.
I've googled everything but cannot seem to fix it, can anybody assist please?
Code:
Audio = Application.WorksheetFunction.VLookup(TextBox1.Value, Worksheets("Employee List").Range("A:P"), 12, 0)
If Audio = "No" Then
ComboBox1.Enabled = False
TextBox5.Enabled = False
End If