title: Create Range expression to use in Union() method
body: <p>I want to create a range expression to use within <code>Union()</code> method.</p>
  
  <p>I have this code so far:</p>
  
  <pre><code>Sub RangeExpresion()
  Dim str As String, s
  
  str = "2,10"
  s = Split(str, ",")
  
  ' (1) If I do this it works. It selects rows 2 and 10
  Union(Rows("" &amp; s(0) &amp; ""), Rows("" &amp; s(1) &amp; "")).Select
  
  ' (2) If I do this doesn't work. The expression is not correct. I get error
  h = "Rows("" &amp; s(0) &amp; ""), Rows("" &amp; s(1) &amp; "")"
  Union(h).Select
  
  End Sub
  </code></pre>
  
  <p>As you can see, in first <code>Union()</code> command I use inside the expression <code>Rows("" &amp; s(0) &amp; ""), Rows("" &amp; s(1) &amp; "")</code> and is accepted and rows 2 and 10 are selected.</p>
  
  <p>In second <code>Union()</code> I first try to store in a variable the same expression that works above, but this time I get error </p>
  
  <blockquote>
    <p>argument not optional</p>
  </blockquote>
  
  <p>How would be the way to do this? Thanks in advance.</p>