Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default select range and put range address in variable

Through a command button in a user form, I want to ask a user to select
a group of cells(range). The user selects the cells. I would like to
retrieve the address of that range and place it in a variable.
Mary

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default select range and put range address in variable

Try the RefEdit Control. It should be one of the standard controls in you VBA
toolbox. It is used for selecting ranges...
--
HTH...

Jim Thomlinson


" wrote:

Through a command button in a user form, I want to ask a user to select
a group of cells(range). The user selects the cells. I would like to
retrieve the address of that range and place it in a variable.
Mary


  #3   Report Post  
Posted to microsoft.public.excel.programming
N10 N10 is offline
external usenet poster
 
Posts: 141
Default select range and put range address in variable

Hi
Also this might help you

sub Example ()

Dim task As Range
Dim str As String

Range("a1:c4").Select ' for example
Set task = Selection
str = task.Address
MsgBox ("TASK= ") & str

End Sub



"Jim Thomlinson" wrote in
message ...
Try the RefEdit Control. It should be one of the standard controls in you
VBA
toolbox. It is used for selecting ranges...
--
HTH...

Jim Thomlinson


" wrote:

Through a command button in a user form, I want to ask a user to select
a group of cells(range). The user selects the cells. I would like to
retrieve the address of that range and place it in a variable.
Mary




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Select a variable range Bluecat Excel Worksheet Functions 7 January 13th 09 01:24 AM
Range Address Memory Variable Limitation MSweetG222 Excel Programming 4 December 12th 05 06:35 PM
Select a Range Through a Variable GoFigure[_9_] Excel Programming 3 December 6th 05 01:02 PM
How do you get a Selected Range address into a variable? Jack Excel Programming 5 November 20th 03 04:09 AM


All times are GMT +1. The time now is 03:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"