title: Date lookup issue: Unable to get VLookup property of WorksheetFunction class
body: <p>I've tried almost everything in most of the other similar type questions but I can't seem to solve the runtime error. Help please! </p>
  
  <p>What I want to achieve: 
  1) My macro is supposed to get date from report summary files that are created every day hence, it requires the user to input which date of report he wants the data from
  2) I use the vlookup method to get the data from the relevant row and input it into the central workbook with the macro
  3) Every part of the code works except using the date to Vlookup and it will give me this error message
  4) I have tested the code using other text based lookup values and the whole macro works (i.e. i looked up the row which has the "Total" value so it looks up "Total" but i require the macro to look up the rows with the date as the look up value)</p>
  
  <p>Addtional Info:
  1) In the lookup file, the dates are in the format of "m/d/yyyy" but presented in the format of "dd-mmm-yy" (but i've tried both and they dont work)</p>
  
  <pre><code>Sub GetData()
  
  Dim strDate As Date
    strDate = InputBox("Input date of report to retrieve        (Format: DD-MM-YYYY)", "Input Date", Format(Now(), "DD-MM-YYYY"))
    If IsDate(strDate) Then
  
  
  'there is some code here not relevant but basically i need to keep manipulating the date throughout the code
  
  
  With ActiveSheet
      Dim XstrDate
      Dim Xfile As String
  
      XstrDate = Format(strDate, "mmm DD, YYYY")
      Xfile = "C:\...\...\...\Report " &amp; XstrDate &amp; ".xls"
  
  
  Dim wb As Workbook
  Dim ws As Worksheet
  Dim rng As Range
  Dim returnValue as Variant
  
  Set wb = Application.Workbooks.Open(Xfile)
  Set ws = wb.Worksheets("Summary")
  Set rng = ws.Range("A:K")
  
  
  Dim Xdate As String
      Xdate = Format(XstrDate, "m/d/yyyy")
  
  returnValue = Application.WorksheetFunction.VLookup(Xdate, rng, 2, 0)
  
  '... more code
  </code></pre>
  
  <p>remember, i've tried looking up using the text in the same column and it returned me a value. So i suspect the problem lies with the date format or something</p>
  
  <p>Any smart and kind soul want to offer some suggestions here:)</p>