+ Reply to Thread
Results 1 to 3 of 3

want to get selected region address in textbox

  1. #1
    Registered User
    Join Date
    02-08-2016
    Location
    Maharashtra
    MS-Off Ver
    Office 2010
    Posts
    11

    Question want to get selected region address in textbox

    i have a userform.. when a form loads i want to select the range from active sheet and after i select a range i want to display the selected cell address in textbox.. i want to do this automatically without using inputbox or clicking any button... i want to select the range and its address should be displayed in textbox... plss help

    also it is an addin which i'm creating so i guess i wont be able to use Worksheet_SelectionChange Event
    Last edited by vini1508; 02-17-2016 at 06:53 AM.

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: want to get selected region address in textbox

    Hi vini1508,

    Try the following code which is included in the attached file. Remove the code from the 'Sheet1' module if you don't want to be able to change the range after the UserForm is displayed. To be able to change the range after the UserForm is displayed you need a 'Modeless' UserForm which DOES NOT lock out Excel.

    In the Sheet1 code module:
    Please Login or Register  to view this content.
    In the UserForm1 Code Module:
    Please Login or Register  to view this content.
    In Ordinary code module ModUserForm1:
    Please Login or Register  to view this content.
    Lewis

  3. #3
    Registered User
    Join Date
    02-08-2016
    Location
    Maharashtra
    MS-Off Ver
    Office 2010
    Posts
    11

    Re: want to get selected region address in textbox

    Thanks LJMetzger

+ 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: 2
    Last Post: 06-01-2015, 06:23 PM
  2. [SOLVED] Textbox and Option Buttons - If Textbox has a Value then an Option Button must be selected
    By MeerkatMatt in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-08-2014, 07:45 AM
  3. [SOLVED] How do I shade a region between two selected points on the x axis?
    By cmc14 in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 05-09-2014, 01:40 PM
  4. Replies: 4
    Last Post: 05-17-2012, 06:30 PM
  5. Replies: 1
    Last Post: 03-08-2012, 01:57 PM
  6. Replies: 1
    Last Post: 10-04-2007, 12:04 PM
  7. Highlight all Text in a Textbox when the textbox is selected
    By RPIJG in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-28-2005, 03:28 PM

Tags for this Thread

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