title: Using Alias keyword to declare a function in VBA
body: <p>I have VBA MS Access form code, where I type the following function declaration:</p>
  
  <pre><code>Public Declare Function GetUserName Lib "advapi32.dll" () Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
  </code></pre>
  
  <p>However I'm getting an error on <code>Alias</code>. Do I have to add some references in order to use this?</p>