Selection data type?

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,805
Office Version
  1. 2016
Platform
  1. Windows
Hi
I found that the data type of Selection is "Object". I am trying to understand the code below. So the data type of Selection is Object. That does not help! how can I know what is the properties and functions of that object?
How can someone know SpecialCells is a function or property of that object.
I tried to use Object Browser to find out what is inside OBJECT but nothing came up.

Code:
Sub del_blank()
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.Delete
End Sub
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Selection is a Range not the contents.
 
Upvote 0
Thanks for your reply. Am I searching the right object? Please see the screen shot below

9
2dbmbdy.jpg
 
Upvote 0
Selection does not have to be a Range, it can just as easily be a shape, an Image, a graph etc
 
Upvote 0
From MSDN
A Selection object represents the range of text selected by the user or the current position of the caret
.
 
Upvote 0
Thank you, now I understand why it is defined as an Object. Because it can be Range, Shape etc.
Thank you all. Thanks
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,869
Messages
6,122,012
Members
449,060
Latest member
LinusJE

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top