Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Leon Hansen   on Dec 11 In MS Office Category.

  
Question Answered By: Garry Sanchez   on Dec 11

InputBox returns a string, not an actual range, so you'll need to first
return the result to a string and then turn that into a range.

How about:

Option Explicit
Dim obRange1 As Range ' <- change
Sub MergeLists()
Dim s as string
s = Application.InputBox(prompt:="Select first range of data", _
Type:=8)
Set obRange1 = ActiveWorkbook.ActiveSheet.Range(s)
obRange1.Select ' If you want to select the specified range.
End Sub

Share: 

 

This Question has 3 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Run Time Error 424 - Object Required Or get search suggestion and latest updates.


Tagged: