title: MS Access VBA: Reference Excel Application Object created in separate Module
body: <p>This seems like it should be an easy one but I'm stuck.</p>
  
  <p>I'm running a VBA script in Access that creates a 40+ page report in Excel.</p>
  
  <p>I am creating an Excel Application Object using Early Binding:</p>
  
  <p><code>Public obj_xl As New Excel.Application</code></p>
  
  <p>Here is an example of how I am referencing the object:</p>
  
  <pre><code>With obj_xl
    .Workbooks.Add
    .Visible = True
    .Sheets.Add
    .blahblahblah
  End With
  </code></pre>
  
  <p>The problem is that the procedure has become too large and I need to break the code up into separate modules.</p>
  
  <p>If I try to reference the Excel Application Object from a different module than it was created in, it throws an error ("Ambiguous Name").</p>
  
  <p>I'm sure I could do something with Win API but that seems like it would be overkill.</p>
  
  <p>Any thoughts?  Thanks </p>