title: Working in VBA, I cannot assign a string to an initlialized string variable (compiling error: expected end of statement)
body: <p>I am working in a module in access trying to initialize variables.  For some reason the declaration: </p>
  
  <pre><code>Dim ModName As String = "modWindowsFileSystem" 
  </code></pre>
  
  <p>creates a compiling error at the '=' with the error message "Expected:end of statement".  I have looked up the format on mutiple websites that all agree with my syntax here is a trustworthy one:
  <a href="http://msdn.microsoft.com/en-us/library/7ee5a7s1.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/7ee5a7s1.aspx</a>
  Another website suggested I declare the variable within a function such as</p>
  
  <pre><code>Sub AssignValueString()
     Dim Modname As String
     Modname = "modWindowsFileSystem"
  End Sub
  </code></pre>
  
  <p>but that seems unnecessary.  One issue that may be considered is I have saved the module and named it modWindowsFileSystem.  I am not sure if this will conflict somehow with initializing that variable. </p>