title: Excel VBA to SQL Server ADODB Connection - Prompt for User ID and Password
body: <p>Excel VBA</p>
  
  <p>The following ADO DB Connection string works and fetches data from the database into Excel</p>
  
  <pre><code>Const rspADO As String = "Provider=SQLOLEDB.1;" &amp; _
  "Persist Security Info=False;" &amp; _
  "Initial Catalog=MyDatabase;" &amp; _
  "Data Source=118.aaa.yy.xx;" &amp; _
  "User ID=Username;Password=password;"
  </code></pre>
  
  <p>How do I prompt the user for input of Username and Password (at runtime) using the Data connection prompt (and not the Inputbox or a Userform in Excel)? </p>
  
  <p>Thanks in advance for the help. </p>
  
  <p></p>