Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default How to know if a range has been selected

Like the difference between selecting a range or an object (chart/button/...)??

If TypeName(Selection) = "Range" Then
MsgBox "it's a range!"
Else
MsgBox "it's not a range...it's a: " & TypeName(Selection)
End If



Maria wrote:

I'm fairly new to excel vba. Can someone tell me how to determine if a range
has been selected on a worksheet? If a selection has not been made, I need
to display a message to the end user.

--
Regards.


--

Dave Peterson
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
How do I edit a selected range then copy the range into an new sheet??? dwyborn Excel Programming 2 December 16th 05 04:11 PM
Get Name of Selected Range Charlie Excel Programming 5 November 22nd 05 11:21 PM
Compare a selected Range with a Named range and select cells that do not exist PCLIVE Excel Programming 1 October 18th 05 07:09 PM
How can I set a range can't be selected! cherishman Excel Programming 2 May 28th 05 01:42 PM
Box around selected range Tom Ogilvy Excel Programming 1 September 7th 03 04:42 PM


All times are GMT +1. The time now is 08:32 PM.

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"