+ Reply to Thread
Results 1 to 3 of 3

How to make WebBrowser control display different HTML files on subsequent macro runs

  1. #1
    Registered User
    Join Date
    10-26-2011
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    50

    Question How to make WebBrowser control display different HTML files on subsequent macro runs

    I have some code that generates a HTML file (of a tag cloud/word cloud image) titled "WordCloud" in the local directory. The macro creates a worksheet and displays this HTML file within a WebBrowser control. However if the user runs the code on multiple ranges - generating different word cloud images - the HTML file generated is continually replaced by the image generated off the most recently selected range input.

    This problem doesn't become apparent until closing the workbook and reopening, at which point all of the WebBrowser's on different generated summary sheets will show the same HTML image. I think one solution (which I unfortunately wouldn't know where to begin coding) would be to give the generated WordCloud files unique names such that the WebBrowser controls could reference the appropriate image file.

    I have attached the VBA code below where I believe the tweak would have to be made, please let me know if you would like the .js, jsapi, and wc.css files which the code requires be stored locally to run properly as well (but for some reason I can't attach any to this). The Thank you so much for looking at this post.

    VBA Code:
    WC Tool 5.xlsm

  2. #2
    Registered User
    Join Date
    10-26-2011
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: How to make WebBrowser control display different HTML files on subsequent macro runs

    I'm thinking some sort of naming alteration to this part of code possibly? I'm not really sure though VBA noob still I'm afraid. It would be awesome if the user could close the workbook and refer to it later and have it displaying the correct Tag/Word Clouds.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-26-2011
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: How to make WebBrowser control display different HTML files on subsequent macro runs

    Anyone have any ideas? Sorry not a programmer in the least

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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