Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default Testing Range Extent

Hi All
How can I test in VBA if the selected range is a single cell or multiple
cells or multiple range of cells?

Many thanks

Cheers
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Testing Range Extent

Sub howmany()
MsgBox (Selection.Count)
MsgBox (Selection.Areas.Count)
End Sub

--
Gary''s Student - gsnu200722
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default Testing Range Extent

Many thanks

"Gary''s Student" wrote:

Sub howmany()
MsgBox (Selection.Count)
MsgBox (Selection.Areas.Count)
End Sub

--
Gary''s Student - gsnu200722

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Testing if a cell is within a range Conan Kelly Excel Programming 4 September 11th 06 07:41 PM
Testing a range for blanks Guy Normandeau Excel Programming 1 July 5th 06 02:37 PM
Testing Range from other Sheets Steven Excel Programming 1 March 9th 06 06:11 PM
testing whether the ActiveCell is in a given range Paul Ponzelli Excel Programming 2 August 10th 05 05:20 PM
Defining Range Extent Nigel[_4_] Excel Programming 2 October 5th 03 12:10 PM


All times are GMT +1. The time now is 08:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"