We help IT Professionals succeed at work.

Is Nested

AmishTaxi asked
Hello Experts,

I am trying to use VBA in Excel to find out if the active worksheet is embeded in a browser or not.

On Excel 2003, I've tried ".parent.name" but it returns, "Microsoft Excel" and not the browser that it is opened up in.

Any ideas here?
Watch Question

AndyAinscowFreelance programmer / Consultant
Does this do what you want:

(Note you may have to check if .parent has actually got a parent before trying to get the name.)


Hi AndyAinscow,

That was a good idea you had.  I also tried the following with no luck:


Basically, this is an Excel 2003 Macro running inside of Windows Internet Explorer which the end-users are accessing through Citrix.  The strange part here is that a lot of the Excel functionality is there but some sections of code that need to be flagged.

I am in the process of fully qualifing my Excel references which does help and I also would like to add this boolean function to throw a flag if Excel Is_Nested inside another application.

Thanks again for helping out!

I just wanted to give an update that the answer was to basically not test to see if it was nested and basically fully qualify the Excel Objects (Example: use "ThisWorkbook.Sheets [...]" instead of just "Sheets[...]")

Cool, thanks for your help!


I split this because I felt the first response was very helpful in leading to the right answer (clearly defining all references)

Thanks for your help!

Explore More ContentExplore courses, solutions, and other research materials related to this topic.