Within a longer macro I've included the following
Dim readingdate As String
Dim yrstart As Date
yrstart = Application.WorksheetFunction.VLookup(readingdate, Sheets("Lookups").Range("B7:E19"), 4, False)
but it returns an error "Unable to get the VLookup propertry of the Worksheetfunction class".
The VLookup works as an spreadsheet function. What's stopping it working in VBA?
thanks
Geoff
Dim readingdate As String
Dim yrstart As Date
yrstart = Application.WorksheetFunction.VLookup(readingdate, Sheets("Lookups").Range("B7:E19"), 4, False)
but it returns an error "Unable to get the VLookup propertry of the Worksheetfunction class".
The VLookup works as an spreadsheet function. What's stopping it working in VBA?
thanks
Geoff
Last edited: