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

Return how many cells are selected on a worksheet

Status
Not open for further replies.

GSMike

Programmer
Feb 7, 2001
143
US
Is there a way to return this?
If there is one cell selected, I want "1"; if two are selected, I want "2".
I was trying

Code:
Activesheet.range.select

Any ideas?
Thank you.
Mike Kemp
 
This might help (even though it's the reverse of what you were looking for)

Set CellCount = Application.InputBox("Highlight a range ", Type:=8)

MsgBox CellCount.Cells.Count
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top