title: How to apply the Merge function to the Range object which is selected from the user using InputBox?
body: <p>I tried to apply the merge function to the range object which is return from the InputBox by selecting the ranges from the user .But error is occruing </p>
  
  <blockquote>
    <p>"Run-Time Error "1004" : Method "Range" of Object '_Global" failed.`</p>
  </blockquote>
  
  <pre><code>Sub SelectRangeandMerge()
     Dim UserRange As Range
     Set UserRange = Application.InputBox(Prompt:="Please Select Range ", _
                  Title:="Range Select ", Type:=8)
     Range("UserRange").Merge
  End Sub
  </code></pre>