I am writing a vba script that will look up the row of a time function. I have a named range Date_Time that refers to a range in worksheet "Schedule" of A:A. Here is what I have :
Dim vlline as long
vlline = Application.Worksheetfunction.Match(stDate,Range(Date_Time))
Note stDate is defined in a cell with data validation of the range Date_Time.
I get an error 1004
I have tried to change the match function also to (stDate,Worksheets("Schedule").Range("A:A")) and that does not work either.
What am I missing?