title: How can I connect to a ms-access database from vba in excel?
body: <p>I'm trying to connect to an ms-access database from Excel by using VBA code, but I receive the error message "not valid password". I have an office 365 subscription.</p>
  
  <p>I have tried passwords with only numbers, only words, putting a ";" character at the end of the password.</p>
  
  <pre><code>Set cn = CreateObject("ADODB.Connection")
  conexion = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccessFile.accdb; Jet OLEDB:Database Password=MyDbPassword"
  cn.Open conexion
  </code></pre>