ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Range selecting in non-active workbook (https://www.excelbanter.com/excel-programming/349146-range-selecting-non-active-workbook.html)

SJC[_2_]

Range selecting in non-active workbook
 
Hi,
Is it possible to allow the user to select a range in a workbook other than
the active one? A RefEdit control doesn't appear to let me do this. I want
to create a procedure that will allow the user to select a range in the
active workbook and compare it to a range they select in another workbook
(again of their own choosing). The purpose is to build an easy to use
utility to identify common entries in two different lists. Any suggestions?

Thanks,

SJC



Tom Ogilvy

Range selecting in non-active workbook
 
dim rng as Range
on Error resume Next
set rng = Application.Inputbox("Select Range",type:=8)
On Error goto 0
if rng is nothing then
msgbox "failed to choose range, quitting"
exist sub
End if
msgbox "Chose " & rng.Address(0,0,xlA1,true)

--
Regards,
Tom Ogilvy


"SJC" wrote in message
...
Hi,
Is it possible to allow the user to select a range in a workbook other

than
the active one? A RefEdit control doesn't appear to let me do this. I want
to create a procedure that will allow the user to select a range in the
active workbook and compare it to a range they select in another workbook
(again of their own choosing). The purpose is to build an easy to use
utility to identify common entries in two different lists. Any

suggestions?

Thanks,

SJC





SJC[_2_]

Range selecting in non-active workbook
 
Thanks once again. I had tried using the inputbox method but when I tested
it I couldn't open the other file. I was trying to maximise the 2nd file
from the windows bar. Seeing as you suggested it I tried a bit harder and
found I had to minimise the active workbook first. I guess I should have
more confidence in myself! Many thanks.

SJC


"Tom Ogilvy" wrote in message
...
dim rng as Range
on Error resume Next
set rng = Application.Inputbox("Select Range",type:=8)
On Error goto 0
if rng is nothing then
msgbox "failed to choose range, quitting"
exist sub
End if
msgbox "Chose " & rng.Address(0,0,xlA1,true)

--
Regards,
Tom Ogilvy


"SJC" wrote in message
...
Hi,
Is it possible to allow the user to select a range in a workbook other

than
the active one? A RefEdit control doesn't appear to let me do this. I
want
to create a procedure that will allow the user to select a range in the
active workbook and compare it to a range they select in another workbook
(again of their own choosing). The purpose is to build an easy to use
utility to identify common entries in two different lists. Any

suggestions?

Thanks,

SJC







Tom Ogilvy

Range selecting in non-active workbook
 
You should be able to use the window menu item (then select the workbook you
want) to navigate to the open workbook if they are maximized.

--
Regards,
Tom Ogilvy



"SJC" wrote in message
...
Thanks once again. I had tried using the inputbox method but when I tested
it I couldn't open the other file. I was trying to maximise the 2nd file
from the windows bar. Seeing as you suggested it I tried a bit harder and
found I had to minimise the active workbook first. I guess I should have
more confidence in myself! Many thanks.

SJC


"Tom Ogilvy" wrote in message
...
dim rng as Range
on Error resume Next
set rng = Application.Inputbox("Select Range",type:=8)
On Error goto 0
if rng is nothing then
msgbox "failed to choose range, quitting"
exist sub
End if
msgbox "Chose " & rng.Address(0,0,xlA1,true)

--
Regards,
Tom Ogilvy


"SJC" wrote in message
...
Hi,
Is it possible to allow the user to select a range in a workbook other

than
the active one? A RefEdit control doesn't appear to let me do this. I
want
to create a procedure that will allow the user to select a range in the
active workbook and compare it to a range they select in another

workbook
(again of their own choosing). The purpose is to build an easy to use
utility to identify common entries in two different lists. Any

suggestions?

Thanks,

SJC










All times are GMT +1. The time now is 01:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com