title: Calling Access function from Excel
body: <p>I'm trying to call the GUIDFromString Access function from Excel.</p>
  
  <pre><code>Dim accessApp
  Set accessApp = CreateObject("Access.Application")
  
  accessApp.OpenCurrentDatabase (ThisWorkbook.Path &amp; "\" &amp; "DB.accdb")
  
  MsgBox accessApp.GUIDFromString("PassingAString")
  
  accessApp.Quit
  
  Set accessApp = Nothing
  </code></pre>
  
  <p>I've tried different things but all generate an error.
  The above is generating:</p>
  
  <pre><code>ActiveX component can't create object
  </code></pre>
  
  <p>(<a href="https://msdn.microsoft.com/en-us/vba/access-vba/articles/application-guidfromstring-method-access" rel="nofollow noreferrer">https://msdn.microsoft.com/en-us/vba/access-vba/articles/application-guidfromstring-method-access</a>)</p>
  
  <p>EDIT: I just came across this post (<a href="https://stackoverflow.com/questions/125785/password-hash-function-for-excel-vba">Password hash function for Excel VBA</a>), using the code from Chris for my purposes.</p>