I should write a macro to get the data range from user.
Now I am using "Inputbox" to obtain the range of data.
However, I thnk it is unconvinient.
So could I get the range by highlighting the related cells by using
macro.
Hi
Use a Userform with a RefEdit control from the Control Toolbox. This
allows you to select a range using the mouse while the form is visible.
The value of the RefEdit control is the address selected as a string
which you can use in code as Range(SelectionString) for example.
regards
Paul
hurriancep wrote:
> I should write a macro to get the data range from user.
> Now I am using "Inputbox" to obtain the range of data.
> However, I thnk it is unconvinient.
> So could I get the range by highlighting the related cells by using
> macro.
>
>
> --
> hurriancep
> ------------------------------------------------------------------------
> hurriancep's Profile: http://www.excelforum.com/member.php...o&userid=31358
> View this thread: http://www.excelforum.com/showthread...hreadid=510518
"hurriancep" <hurriancep.22ylmy_1139483702.2469@excelforum-nospam.com> wrote
in message news:hurriancep.22ylmy_1139483702.2469@excelforum-nospam.com...
>
> I should write a macro to get the data range from user.
> Now I am using "Inputbox" to obtain the range of data.
> However, I thnk it is unconvinient.
> So could I get the range by highlighting the related cells by using
> macro.
>
Use Application.InputBox and set the Type parameter to 8
Robert
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks