title: VBA check if array is one dimensional
body: <p>I have an array (that comes from SQL) and can potentially have one or more rows.</p>
  
  <p>I want to be able to figure out if the array has just one row.</p>
  
  <p>UBound doesn't seem to be helpful. For 2-dimensional arrays <code>UBound(A,1)</code> and <code>UBound(A,2)</code> returns the number of rows and columns respectively, but when the array has only one row, <code>UBound(A,1)</code> returns the number of columns and <code>UBound(A,2)</code> returns a <code>&lt;Subscript out of range&gt;</code>.</p>
  
  <p>I have also seen <a href="http://support.microsoft.com/kb/152288" rel="noreferrer">this Microsoft help page</a> for determining the number of dimensions in an array. It is a very horrifying solution that involves using the error handler.</p>
  
  <p>How can I determine whether the array has just one row (hopefully without using the error handler)?</p>