Is Nested

Posted on 2012-08-15
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 "" but it returns, "Microsoft Excel" and not the browser that it is opened up in.

Any ideas here?
Question by:AmishTaxi
    LVL 43

    Assisted Solution

    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

    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


    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

    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!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
    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…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    794 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

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now