InputBox that obtains Workbook, Worksheet, and Range
Hi J,
Try something like:
'=============
Public Sub Tester()
Dim Rng As Range
Dim sStr As String
On Error Resume Next
Set Rng = Application.InputBox( _
Prompt:="Select range", _
Type:=8)
On Error GoTo 0
If Not Rng Is Nothing Then
sStr = Rng.Address(external:=True)
MsgBox sStr
End If
End Sub
'<<=============
---
Regards,
Norman
"J@Y" wrote in message
...
I have a macro that takes a range of cells as input. I am trying to use an
InputBox or something similiar to let the user select the range they need.
First how would I let the user select their range in the format :
'[Book1.xls]Sheet2'!$F$6:$F$10, and second how would I transform that into
a
variable that's similiar to Workbooks().WorkSheets().Range()?
|