title: VBA Declare date/time data
body: <p>I ve got hourly data and when I try to execute the following code I get an runtime error 91.The format of my data in the CYC sheet is for example #07/07/2009  23:00:00# (at row 194), but when I enter this to dt it automatically converts it to #7/7/2009 11:00:00 PM#. (please note that shtCYC and shtCo have been declared and set). </p>
  
  <pre><code>Dim dt As Date
  dt = #7/7/2009 11:00:00 PM#
      Do
      shtCYC.Activate
      'finds the day
      Set rng = shtCYC.Range("A3:A1514").Find(dt, , xlValues)
      'copies the dates
      shtCYC.Range("A" &amp; rng.Row - 191 &amp; ":A" &amp; rng.Row + 24).Copy (this is where the debug highlights)
      shtCO.Range("B10").PasteSpecial Paste:=xlPasteValues
  </code></pre>
  
  <p>Anyone got any ideas..?
  Many Many thanks!</p>