+ Reply to Thread
Results 1 to 4 of 4

How do I suppress warnings when following Hyperlinks

  1. #1
    Steve Franks
    Guest

    How do I suppress warnings when following Hyperlinks

    I have a macro, which follows the hyperlinks in a worksheet.
    Excel displays a warning about the dangers of opening files, if the files
    are not on my PC.
    Is there any way to suppress these messages and avoid having to click on OK
    several hundred times? Preferably without changing security levels.
    Thanks in advance.
    --
    Steve Franks

  2. #2
    Registered User
    Join Date
    08-14-2006
    Posts
    29
    Hi Steve,

    Have you tried:

    application.displayalerts = false

    NOt sure if that over-rides these kinds of security warnings though. If it does, be sure to switch the alerts back on afterwards with:

    application.displayalerts = true

    Probably won't work but worth a shot.

    Cheers
    Joe

  3. #3
    Steve Franks
    Guest

    Re: How do I suppress warnings when following Hyperlinks

    Thanks for helping, you're right it didn't work.
    --
    Steve Franks


    "LFCFan" wrote:

    >
    > Hi Steve,
    >
    > Have you tried:
    >
    > application.displayalerts = false
    >
    > NOt sure if that over-rides these kinds of security warnings though. If
    > it does, be sure to switch the alerts back on afterwards with:
    >
    > application.displayalerts = true
    >
    > Probably won't work but worth a shot.
    >
    > Cheers
    > Joe
    >
    >
    > --
    > LFCFan
    > ------------------------------------------------------------------------
    > LFCFan's Profile: http://www.excelforum.com/member.php...o&userid=37484
    > View this thread: http://www.excelforum.com/showthread...hreadid=572117
    >
    >


  4. #4
    Registered User
    Join Date
    08-14-2006
    Posts
    29
    The only other way I could think of achieving this is to shell to command (wscript) and have it run an outside vbscript for you which presses the buttons for you using a timer and sendkeys (obviously code halts inside excel while a dialog box is showing). So it would look a bit like this:


    sub speculative()

    set wsObj = createobject("wscript.shell")
    wsObj.run("c:\winnt\system32\cmd.exe /c wscript c:\press_buttons.vbs")
    Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True

    end sub

    Then in the vbscript:

    sub pressButtons()

    set bpObj = createobject("wscript.shell")
    bpObj.appactivate("My_Workbook_Name")
    bpObj.sendkeys "My_button_presses_here"

    end sub

    Pure speculation, none of this tested!

    Cheers
    Joe

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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