title: VBA: my program is throwing compile error on Format
body: <p>So I'm working with my program. It works and runs, so I copied it and made a second version which I can add extra features to while still having a working program. I don't see any problems with my new code, so I prepare to step thru it. Suddenly things which work perfectly fine in my other version are throwing compile errors. Specifics below.</p>
  
  <pre><code>Dim elapsedTime As String
  Dim startTime As Date
  startTime = Now()
  'code
  elapsedTime = Format(Now() - startTime, "h:m:s")
  </code></pre>
  
  <p>I checked again and again, but this exact same code works fine in my other file. In this file, it highlights "Format" and throws the following Compile Error.
  <a href="https://i.stack.imgur.com/TdurH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TdurH.png" alt="Compile Error: arguments or property"></a></p>
  
  <p>Does anyone know why excel would be getting so upset at this? If there are compile errors, should I even be looking at the places it highlights at all?</p>