Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Input box does not allow selection in another file

Pasted in your code and ran it in xl2000.

I had no problem selecting from any open workbook.

So no, there are no adjustments to your code that would allow you to select
from any open workbook.

As I recall, xl2002 or xl2003 had a problem with this, but I was under the
impression this was using a refedit control on a userform (which has the
same functionality), but perhaps the problem affects the
application.inputbox as well. What version of Excel are you using?

--
Regards,
Tom Ogilvy

"quartz" wrote in message
...
Yesterday Tom Ogilvy kindly responded to my post and made a few slight
corrections to my function, which consists of an input box that retrieves

and
returns the file name, sheet name, and range selected by the user.

Thanks to Tom, my function now allows the user to make a selection on any
sheet in the currently ACTIVE file. However, it won't allow the user to
switch to another file once the input box is opened. Is it possible to

tweak
my function some more to make this possible? If not is there an efficient
work around? My current code follows (please correct for line wrapping):

Function InputBoxRange() As String

Dim rngResponse As Range
Dim strMsg As String
Dim intConfirm As Integer

On Error Resume Next
Do
Set rngResponse = Application.InputBox("Type or select the range
containing the first list to be compared:", "RANGE VALIDATION",
Selection.Address, , , , , 8)
If Err.Number < 0 Then Err.Clear: End
Application.Goto rngResponse
intConfirm = MsgBox("Is the following selection correct?" & vbCr &

vbCr
& rngResponse.Address(External:=True), vbQuestion + vbYesNo, "CONFIRM
SELECTION")
If intConfirm = vbYes Then Exit Do
Loop
InputBoxRange = rngResponse.Address(External:=True)

End Function

Thanks much (again) in advance.



Reply
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
Input selection choices ARGT Excel Discussion (Misc queries) 4 July 8th 08 03:59 AM
Copy Selection - Transpose Selection - Delete Selection Uninvisible Excel Discussion (Misc queries) 2 October 23rd 07 04:18 PM
Hyperlink for file selection only hmm Excel Worksheet Functions 0 May 17th 07 11:58 AM
Extracting data from one xls file and input into another xls file trainerbro Excel Discussion (Misc queries) 1 November 1st 06 08:57 PM
User Input File Name kem Excel Programming 2 July 14th 03 10:23 PM


All times are GMT +1. The time now is 09:31 PM.

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

About Us

"It's about Microsoft Excel"