title: How to detect when no cell is selected while using Selection.SpecialCells(xlCellTypeVisible)?
body: <p>In my Sub I'm using below code to obtain user selected range.</p>
  <pre class="lang-vb prettyprint-override"><code>Dim rng As Range
  Set rng = Selection.SpecialCells(xlCellTypeVisible)
  </code></pre>
  <p>It works fine as long as user selects some cells/range. However whenever macro is called without selecting any cells, rng overflows and application freezes. Is there any way to detect if user hasn't selected any cells and exit safely?.</p>