title: Combination of N variables in VBA
body: <p>Here I Have some complex combination problem for VBA in Excel.
  I have n variable defined by starting value, stop value and steps.
  N variables are double values basically like below.</p>
  
  <pre><code>      Var1, Var2,  Var3, .... VarN
  start:  20,    1,   0.1, ....  
  stop : 100,   10,   1.0, ....
  step :  10,    1,   0.1, ....
  </code></pre>
  
  <p>What is the most efficient (fast) way of generating combination of each variable like below:</p>
  
  <pre><code>20, 1, 0.1
  20, 1, 0.2
  20, 1, 0.3
  ...
  ...
  ...
  
  100, 10, 0.8
  100, 10, 0.9
  100, 10, 1.0
  </code></pre>
  
  <p>I believe that there are all 900 combinations (=9x10x10) for this case.</p>
  
  <p>More challenging part is that I need more flexible solution for N variable cases using double array like this (without involving any worksheet formula): </p>
  
  <pre><code>Private startValue() As Double ' start value of each variable
  Private stopValue() As Double  ' stop value of each variable
  Private stepValue() As Double  ' step value of each variable
  Private combination() as double 'combination of all N variable
  Private n as integer ' number of variable = N
  
  
  ReDim startValue(1 To 1, 1 To n) As Double
  ReDim stopValue(1 To 1, 1 To n) As Double
  ReDim stepValue(1 To 1, 1 To n) As Double
  </code></pre>
  
  <p>I really appreciated for your kind help.</p>
  
  <p>Kind regards.</p>