Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Need to identify object selected.

How do I verify if I have selected an object other than a
cell or a range of cells?

Can any one pls help.

Thanks,
-Neil
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need to identify object selected.

If it is only one or if it many cells, the code is the same:

var1 = TypeName(Selection)
If var1 < "Range" Then
DoStuff
Else
DontDoStuff
End If

- Piku

--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 153
Default Need to identify object selected.

Not sure if this will work or help. NameType(activeobject)
If you can stop the code where you want this might help
in the immediate window.

-----Original Message-----
How do I verify if I have selected an object other than

a
cell or a range of cells?

Can any one pls help.

Thanks,
-Neil
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Need to identify object selected.

Neil,

Sub testit()
If Not TypeOf Selection Is Range Then MsgBox "Selection is not a range"
End Sub


Rob

"Neil Bhandar" wrote in message
...
How do I verify if I have selected an object other than a
cell or a range of cells?

Can any one pls help.

Thanks,
-Neil



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
2 Label Options - Forms Object vs Control Box Object Awrex Excel Discussion (Misc queries) 3 July 17th 09 07:10 PM
Object Variable Not Set Error on Selection object Jean Excel Worksheet Functions 3 July 24th 06 06:45 PM
Identify User Selected Range RonF Excel Programming 3 January 12th 04 04:36 PM
Identify Range Selected By User RonF Excel Programming 1 January 9th 04 05:29 PM
Range object to Array object conversion Alan Beban[_3_] Excel Programming 0 August 1st 03 01:24 AM


All times are GMT +1. The time now is 10:55 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"