Input Range using mouse

22strider

Active Member
Joined
Jun 11, 2007
Messages
311
Hello Friends

Could you please help me figure out how to get user select input range using mouse? I have following code in my subroutine; it works for showing the input box where user can type the range. but I am trying to make it user friendly where user can select range using mouse.

Code:
Set rRange = Application.InputBox(Prompt:= _
                "Please select cell where the uniques should be listed", _
                Title:="Specify output Range", _
                Type:=8)

Thanks for your time,
Rajesh
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
The user just selects a range with the mouse and the address will appear in the box.
 
Upvote 0
The problem is; when the input box appears the cursor blinks inside the box only. It won't allow mouse to select anything outside the input box.
 
Upvote 0
Ok; figured it out.
In the beginning of my code I was disabling screen updating and then enabling it in the end (I do that as a habit in all my codes) . Apparently that was causing this issue. Now I am not disabling screen updating in my code and am able to select range with mouse (I have no explanation why it is that way but it worked).
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top