title: Assigning date to a cell in excel vba
body: <p>I am just trying to enter the current date into a cell through excel vba macro. </p>
  
  <p>Following is the code for the same. </p>
  
  <pre><code>Cells(i,j).value = Format(Date, "mm-dd-yyyy")
  </code></pre>
  
  <p>Its giving me </p>
  
  <blockquote>
    <p>Application-defined OR Object defined error</p>
  </blockquote>