View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Charlie Charlie is offline
external usenet poster
 
Posts: 703
Default the Parent property

Good question. Personally I thought that example was crap, but maybe I'm
missing something. I would think the author was trying to say "If Me.Parent
Is Nothing Then 'Me' is not a worksheet" I suspect all worksheets have a
parent.

P.S. if 'Me' is the workbook, not a sheet, then Me.Parent.Name returns
"Microsoft Excel"


"mrmack" wrote:

I see a lot of the objects in the Excel Object Model have this 'Parent'
property.

I am only interested in retreiving the host Workbook for a worksheet, which
brought me to this article:
http://msdn2.microsoft.com/en-us/lib...et.parent.aspx

It worryingly states

"IF the current Worksheet has a parent, then name of the parent workbook is
displayed."

So, I guess my questions is

When would a worksheet not have a parent?