Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

range info of a selection

Status
Not open for further replies.

BoFenger

Programmer
Aug 6, 2003
22
DK
Hi
When I select a range in a excel sheet I would like to get the range info of what I have selected, something like

dim test as range

test=selection.range.info

and "test" is now Range("A1:C3")

how do I do this
Br Bo
 
You are probably looking for the SELECTION Property
This will return the current selected range in the form of a Range Object assuming you have selected cells.

See "Selected Property" in VBA Excel Help for more information.

And in future, please post Excel, Access and General VBA questions in Forum707

HTH

JaG

yosherrs.gif

[tt]'Very funny, Scotty... Now Beam down my clothes.'[/tt]
 



Hi,

Take a look at the Address property of the Range Object.

Skip,

[glasses] [red][/red]
[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top