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.
WC Tool 5.xlsm