![]() |
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 |
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 |
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