+ Reply to Thread
Results 1 to 2 of 2

How to call the Excel "range-selection tool"?

Hybrid View

  1. #1
    Registered User
    Join Date
    08-06-2013
    Location
    the boonies
    MS-Off Ver
    Excel 2007
    Posts
    46

    How to call the Excel "range-selection tool"?

    In numerous GUI's within Excel (for example, when using the fx formula GUI), there is a selection tool that enables the user to graphically select a range of cells. The icon is a spreadsheet with a red arrow, highlighting the first cell. I don't know Excel's proper name for it, but I'd call it a "range-selection tool". Do you know how to call this tool from VBA?

    Thanks,
    g

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,651

    Re: How to call the Excel "range-selection tool"?

    Here's one way. It's not the same range selection tool you described.

    Sub Select_Range_Prompt()
        Dim rng As Range
        On Error Resume Next
        Set rng = Application.InputBox("Select a range. ", "Range Selection", Type:=8)
        On Error GoTo 0
        If rng Is Nothing Then Exit Sub 'User canceled
        
        'Do something with rng
        MsgBox rng.Address(0, 0), , "Example"
        
    End Sub
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 06-25-2013, 10:44 AM
  2. [SOLVED] For Next + Range("A2:G2") + Call mysub
    By ZuluNation in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-09-2012, 04:28 PM
  3. cant find tool "Data analysis" in excel 2007
    By Anzar in forum Excel General
    Replies: 2
    Last Post: 06-14-2009, 11:14 AM
  4. Capable CSV Tool... or make Excel not be "smart"
    By cosmin in forum Excel General
    Replies: 7
    Last Post: 03-14-2006, 04:15 PM
  5. [SOLVED] Binocular search tool, Excel, loses column designation at "Find"
    By Little Rock Ette in forum Excel General
    Replies: 1
    Last Post: 11-16-2005, 01:52 PM

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.6.0 RC 1