ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   select range and put range address in variable (https://www.excelbanter.com/excel-programming/351382-select-range-put-range-address-variable.html)

[email protected]

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


Jim Thomlinson[_5_]

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



N10

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






All times are GMT +1. The time now is 06:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com