Is Nested

Posted on 2012-08-15
Medium Priority
Last Modified: 2012-08-25
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?
Question by:AmishTaxi
  • 3
LVL 45

Assisted Solution

AndyAinscow earned 750 total points
ID: 38299510
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.)

Author Comment

ID: 38300519
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!

Accepted Solution

AmishTaxi earned 0 total points
ID: 38308617

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!

Author Closing Comment

ID: 38332079
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!

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Integration Management Part 2
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question