View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Leith Ross[_293_] Leith Ross[_293_] is offline
external usenet poster
 
Posts: 1
Default Input box range - output range


Hello al007,

The range object variables must be set to an existing reference. I made
the changes to your code for you. The InputBox is merely supplying a
string address that describes the range and is not itself a range. You
can not reference cells that are not on the active sheet with this
Sub.

Sub UniqueFindColumn()
Dim AnArray() As String, i As Long
Dim Selec As Range
Dim Desti As Range
Dim Rng
Rng = Application.InputBox( _
Prompt:="Select cell for Actual data.", Type:=8)
Set Selec = Range(Rng)

Rng = Application.InputBox( _
Prompt:="Select cell for Actual data.", Type:=8)
Set Desti = Range(Rng)
AnArray = GetUniqueEntries(Selec)
If Len(AnArray(0)) 0 Then
For i = 0 To UBound(AnArray)
Range(Desti).Offset(i, 0) = AnArray(i)
Next
End If
End Sub


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=486773