Hi All,
I'm getting an "Object required" compile error for the code below. I'm confident it's something simple but I can't figure it out. Please help me understand why.
I'm getting an "Object required" compile error for the code below. I'm confident it's something simple but I can't figure it out. Please help me understand why.
Code:
Sub FindFrequency()
Dim FunctionSelected As String
Dim Frequency As String
Dim TeamFunctions As Worksheet
Set FunctionSelected = "Appeals"
'Frequency is either Daily, Weekly or Monthly based on the Function selected
Frequency = Application.WorksheetFunction.VLookup(FunctionSelected, TeamFunctions.Range("C1:G999"), 2, False)
MsgBox "The Frequency is : " & Frequency
End Sub
Last edited by a moderator: