title: How to get the previous selection when selection changes?
body: <p>I'm working on an import (from Excel) dialog to select ranges of cells.</p>
  
  <p>When the range is selected, I use the event sink to catch the event and highlight the first row and first column.</p>
  
  <p>I need to unhighlight the previous selection's first row and column.  I don't think it's safe to just get the selected range at the time the selection changes and remember it, such as (pseudocode for brevity and clarity):</p>
  
  <pre><code>OnSelectionChange()
   {
   if (m_PrevSelection)
      UnHilite(m_PrevSelection);
   HiliteCurrentSelection();
   GetSelectedRange(m_PrevSelection);
  }
  </code></pre>
  
  <p>I'm guessing that just holding onto that range (obtained from _Application::Selection) without releasing it is going to cause all sorts of problems.  I haven't found a way to copy the range (IRange Copy just copies cell contents from one range to another).</p>
  
  <p>I guess I could take the range's cell addresses and store those, then recreate a range from them when I need to do the unhighlighting. This would seem to me to come up often. Is there a more elegant solution?</p>