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

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
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,224,823
Messages
6,181,179
Members
453,021
Latest member
Justyna P

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