The .Parent
and .Worksheet
properties, when used with a range, seem to reference to the same worksheet object where Range
is located.
For example, both of these lines return the same value:
Debug.Print Selection.Parent.Name
Debug.Print Selection.Worksheet.Name
Is there a difference between the two? Are there advantages/disadvantages to each method?
Selection.Parent
will be slower because Excel needs to determine what collection theSelection
belongs to:Charts
,Names
,Sheets
,Styles
,TableStyles
,Windows
,Worksheets
,XmlNamespaces
. WithSelection.Worksheet
it goes directly to theWorksheets
collection – paul bicaWith
, IntelliSense cannot pick up any object's Parent. All kinds of objects top Parent is the Application, including it self interestingly. – PatricK