LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default 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()?



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Range through Inputbox jasmine Excel Programming 3 March 5th 07 12:13 AM
Creating an Index Sheet that obtains a cell Value using VBA David Coyle[_2_] Excel Programming 1 October 30th 06 05:02 PM
InputBox method with range Emily Edgington Excel Programming 6 September 8th 06 06:20 PM
Application.inputbox for another workbook Utkarsh Excel Programming 2 September 8th 06 05:57 PM
Select range with InputBox. Is it possible? Isabel Excel Programming 3 March 16th 06 07:02 PM


All times are GMT +1. The time now is 07:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"