title: How to use variable of one function in another function in vba?
body: <p>I am facing one small problem please help me.</p>
  
  <pre><code>sub vari()
  dim b as integer
  dim c as integer
  b=6
  c=8
  end sub
  </code></pre>
  
  <p>now i want to use b and c in another function .</p>
  
  <pre><code>sub calculate()
  dim a as integer
  a = c+b
  end sub
  </code></pre>
  
  <p>I am getting error here</p>