title: VBA - Minimum/ Maximum Value for Date()
body: <p>Is there a reason that the Excel functions of Min &amp; Max are not working for the following code?</p>
  
  <pre><code>Sub minmaxtest()
  
  Dim TEST_VALUES() As Date
  ReDim TEST_VALUES(1 To 5, 1 To 1)
  
  TEST_VALUES(1, 1) = 1
  TEST_VALUES(2, 1) = 2
  TEST_VALUES(3, 1) = 3
  TEST_VALUES(4, 1) = 4
  TEST_VALUES(5, 1) = 5
  
  MsgBox Application.Max(TEST_VALUES)
  
  End Sub
  </code></pre>
  
  <p>This problem does not exist in the case where <code>Dim TEST_VALUES() As Integer</code>, but occurs when declared it a Date.</p>
  
  <p>I have tried to wrap the values that are assigned in <code>(CLng(CDate())</code>, eg, <code>TEST_VALUES(1, 1) = (CLnd(CDate(1))</code> but this also does not solve my problem of performing analysis on this date range (is this the correct name for this type of variable?) Thanks!</p>