title: How to get the MD5 hex hash for a file using VBA?
body: <p>How can I get the MD5 hex hash for a file using VBA?</p>
  
  <p>I need a version that works for a file.</p>
  
  <p>Something as simple as this Python code:</p>
  
  <pre><code>import hashlib
  
  def md5_for_file(fileLocation, block_size=2**20):
      f = open(fileLocation)
      md5 = hashlib.md5()
      while True:
          data = f.read(block_size)
          if not data:
              break
          md5.update(data)
      f.close()
      return md5.hexdigest()
  </code></pre>
  
  <p>But in VBA.</p>