title: Select Case on Referenced Collection in Sub
body: <p>Good Folks.</p>
  
  <p>I want to write a swap routine for collections. The code so far:</p>
  
  <pre><code>Sub swap(ByRef colFrom As Collection, ByRef colTo As Collection, theKey As String)
  'Some needed work beforehand:
  Select Case colFrom
      Case colA:
          ' do A 
          ' colA is a public collection
      Case colB:
          ' do B
          ' colB is also a public collection
      Case Else
          ' do Nothing
  End Select
  
  ' the swap
  ' If KeyExists(colFrom, theKey) Then   ' another function
       colTo.Add Item:=colFrom.Item(theKey), Key:=theKey
       colFrom.Remove (theKey)
       ' do some stuff according to previous select case... 
  ' End If
  </code></pre>
  
  <p>The swap itself does work. But I need to do some cleaning up before and after the swap depending on the collection that was passed on to the sub. With this I get an error "Argument not optional" in line 3 (Select...).
  Adding, e.g. Integer parameters for the check ist possible. But then I would have to make sure, that those integers match with the collections. </p>
  
  <p>Do you have an idea on how to realise this without further parameters?</p>