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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get Text From Selected Cells in Excel Worksheet

Status
Not open for further replies.

YerMom

Programmer
Oct 3, 2006
127
US
Hi.

I need to get the text of selected cells in a worksheet. How do I identify the cells in the selection?

I can probably extract the text in the cells, but I don't know how to programmatically determine which cells are selected.

Let me know if that did not make sense.

Thanks.

 
Why not playing with the Selection object ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 


Hi,

The Selection Object is the selected range.
Code:
dim r as range
for each r in selection
  msgbox r.value
next


Skip,

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

Part and Inventory Search

Sponsor

Back
Top