+ Reply to Thread
Results 1 to 5 of 5

Display other controls ON TOP of the webbrowser control

  1. #1
    Forum Contributor
    Join Date
    10-30-2014
    Location
    England
    MS-Off Ver
    2007 / 365
    Posts
    279

    Display other controls ON TOP of the webbrowser control

    Bit of an odd one this, and I'm guessing this is not possible, but I'll ask anyway...

    I have a webbrowser control on a userform, is it possible that I can have another control (commandbutton, textfield etc) display on top of (i.e. overlapping) the webbrowser control?

    In design mode I can place them on top, but when the userform is launched they are hidden behind.

    Anyway to do this? Set the z-index programatically somehow?

    Thanks.

  2. #2
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Display other controls ON TOP of the webbrowser control

    Try:

    WhatIsOnTop.jpg
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  3. #3
    Forum Contributor
    Join Date
    10-30-2014
    Location
    England
    MS-Off Ver
    2007 / 365
    Posts
    279

    Re: Display other controls ON TOP of the webbrowser control

    That works with all controls except the webbrowser, which always appears on top regardless of the order set in design mode.

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Display other controls ON TOP of the webbrowser control

    ListBoxes and Frames also are automatically Frontmost.

    I'm not sure what your ultimate goal is, but a couple of work arounds might be.

    1) Toggle the visibility of the webbrowser control.
    2) Put the webbrowser in a Frame, make the frame small so there is no overlap, but have Enter/Exit events expand the Frame as needed.
    Last edited by mikerickson; 02-06-2017 at 11:59 AM.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  5. #5
    Forum Contributor
    Join Date
    10-30-2014
    Location
    England
    MS-Off Ver
    2007 / 365
    Posts
    279

    Re: Display other controls ON TOP of the webbrowser control

    Quote Originally Posted by mikerickson View Post
    ...I'm not sure what your ultimate goal is...
    I am using the webbrowser control to load in a local html file as an interface 'form' as I was frustrated with the limited design possible with a standard userform and controls.
    Currently the 'form' only holds information and hyperlinks to run various macros, however, I would like to also include a textbox and possibly a tickbox. I thought if it was possible to overlay these controls on top of the webbrowser, it would save me having to add them as html controls with the headache of then either re-learning javascript (that I never really got too far in to), or the headache of seeing if it's possible to 'scrape' the html file within the webbrowser control (although I suspect this can't be done as the text entered in the text field still wouldn't be part of the actual underlying html code).

    I think I'm going to have to go the javascript route, which I'm pretty sure will at least work.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Rendering CSS3 in the WebBrowser Control
    By EchoPassenger in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-30-2015, 06:26 PM
  2. Microsoft WebBrowser Control Excel
    By MTown in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-16-2015, 10:33 AM
  3. Printing a WebBrowser Control
    By jwillis07 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-31-2013, 06:01 AM
  4. Using WebBrowser Control
    By MikeLanglois in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-10-2013, 01:38 PM
  5. How to make WebBrowser control display different HTML files on subsequent macro runs
    By VTHokie11 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-16-2012, 09:34 AM
  6. Excel - WebBrowser Control - Vista/IE7
    By mehuljshah in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-22-2009, 10:06 AM
  7. Problem with webbrowser control
    By Mike NG in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-14-2005, 07:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1