title: InputBox Range Selection from Userform
body: <p>I am trying to use an inputbox to select a range in a worksheet. In theory it is simple. The user selects a commandbutton on the worksheet which opens a userform. The userform allows for the selection of one of several optionbuttons. Once the form is submitted I want the user to be able to select a range from the active sheet. </p>
  
  <p>After the userform submission, the range inputbox appears, but does not allow for selection on the active sheet.</p>
  
  <p>If I call the inputbox directly from the sheet (do not run through the userform) the input box works properly. However, in this application I need the userform to allow for a selection.</p>
  
  <p>I have tried re-activating the sheet, programmatically selecting a default range, hiding and unloading the userform. </p>
  
  <p>Fundamentally this is all I am doing:</p>
  
  <pre><code>Public Function functionName()
  
      Dim rng As Range
  
      Set rng = Application.InputBox("select range", Type:=8)
  
  End Function
  </code></pre>
  
  <p>It just does not seem to work when it is called from a module by a userform.</p>