+ Reply to Thread
Results 1 to 3 of 3

Thread: Macro--userinput

  1. #1
    Registered User
    Join Date
    02-09-2006
    Posts
    1

    Macro--userinput

    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.

  2. #2
    paul.robinson@it-tallaght.ie
    Guest

    Re: Macro--userinput

    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



  3. #3
    Robert ap Rhys
    Guest

    Re: Macro--userinput


    "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



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0