View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default the Parent property

I should add:

That code is saying that WS.Parent is either a WB or nothing.

which seems misleading if the rest of my post correct.

NickHK

"NickHK" wrote in message
...
Under "normal" XL circumstances, .Parent returns the expected object.
However, (untested and only suspicion, test if you want) when you examine
this property in situations of:
- embedded in another OLE file
- shown in a webrowser
- shown in an OLE control
you may get different answers.

I can see that a WS.Parent may not be WB, but I fail to see how it could
Nothing.
How would you create/reference a WS that had no parent.

That code is saying that WS.Parent is either a WB or nothing.

NickHK

"mrmack" wrote in message
...
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?