+ Reply to Thread
Results 1 to 1 of 1

Active Content warning when ActiveWorkbook.FollowHyperlink is executed

  1. #1
    Forum Contributor
    Join Date
    11-17-2004
    MS-Off Ver
    Office 2016
    Posts
    527

    Active Content warning when ActiveWorkbook.FollowHyperlink is executed

    I have a script that builds an HTML file then launches the html file in the active browser and each time it runs there is a warning message that pops up. The HTML file does not contain any active content, so I'd like to know how to eliminate this particular error, and not because I'm too lazy to click the "Yes" button but because my mouse is configured to change focus to the window that it is over. This causes the warning message to quickly move to the background unless my mouse happens to be over the place where this warning shows up but even then, sometimes it becomes unreachable.

    The VBA code is halted at this point until I can acknowledge the message, and this is not always possible since when this message moves to the background, for some reason it does not always appear as an available window to switch to. Excel just beeps at me when I try and do anything since the code is halted until I acknowledge the message. I've had to end the Excel task and potentially lose any data on a few occasions.

    The other reason I'd like to eliminate this message is that by the time the message appears, the HTML file is already open in the browser and any potential damage would have already be done.

    In testing, any HTML file could be placed in the user's Documents directory and named CS_GoogleMaps.html, an example of the one I use is attached as a text file. My hope is that there is possibly a way to map the file to a trusted location or trust this and all files derived from this template, or to some other way to get around the useless warming.

    The code I use that causes the warning is below, and the actual culprit is the ActiveWorkbook.FollowHyperlink line near the very bottom:
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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] Using 'ActiveWorkbook.FollowHyperlink'... without an ActiveWorkbook
    By EchoPassenger in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-23-2015, 04:01 PM
  2. Getting rid of active content in a file
    By Brian Drozd in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-22-2014, 05:27 PM
  3. [SOLVED] How to put content of active cell in variable?
    By obgle in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-20-2012, 02:08 PM
  4. Check content on notepad before pasting in excel and give warning
    By abhishek79 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-15-2011, 11:05 AM
  5. Active X warning even when in Trusted Location
    By bugmenot in forum Excel General
    Replies: 1
    Last Post: 11-24-2009, 07:50 PM
  6. Different between ActiveWorkbook.Sheet and ActiveWorkbook.WorkSheets
    By Ranjani in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-02-2009, 12:56 AM
  7. ActiveWorkbook.FollowHyperlink Question
    By umrebelfan69 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-13-2007, 08:27 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