title: Global variables
body: <p>Here is my looping code which works great</p>
  
  <pre><code>i = 3
  Do
  Cells(i, 8) = 17012
  i = i + 1
  Loop Until i = 11
  </code></pre>
  
  <p>I would like the "loop until i=11" to read more like " loop until i=f" or some other variable letter is not  important. I want F to represent the value of the number of times another button is pressed. The code below represents the count of clicks. But is under another cmd button. </p>
  
  <pre><code>Static Counter As Integer
  Counter = Counter + 1
  cmdworkstationadd.Caption = Counter
  </code></pre>
  
  <p>So my thinking is the code for output would be:</p>
  
  <pre><code>i = 3
  Do
  Cells(i, 8) = 17012
  i = i + 1
  Loop Until i = F
  </code></pre>
  
  <p>but f has no value so looping never stops because F is seen as 0. how can I set the value of the counter to F so that F has value</p>