title: Unable to Access Public Variables - Excel VBA
body: <p>I am working on a rather large Excel application via VBA. I want to place all my public variables in one module. Then I would assign and use those variables in my other modules in the same workbook. Here's what I have.</p>
  
  <pre><code>Option Explicit
  
  Public wdApp As Word.Application
  Public wdDoc As Word.Document
  </code></pre>
  
  <p>But when I tried to assign those variables in my other modules, I got the following message. Shouldn't public variables be accessible to all modules? What
  am I missing?</p>
  
  <p><a href="https://i.stack.imgur.com/q1te0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q1te0.png" alt="enter image description here"></a></p>