title: Creating connections to Access database from Excel using VBA
body: <p>I have an Excel workbook with several connections to queries in an Access database. I want to be able to share this with colleagues on a USB key, but the connection string has a direct path to the database like so:</p>
  
  <p><code>DSN=MS Access Database;DBQ=C:\USERS\Me\Desktop\Database.accdb;DefaultDir=C:\;DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;
  </code></p>
  
  <p>From what I can tell a relative path can't be used here.
  Is there a way to get the current path of the Excel file when opened and create the connections in VBA? (the database file and the Excel file will always be in the same relative location)</p>