Disable Hyperlink Warning in Excel 2010

thedeceived

New Member
Joined
Aug 29, 2010
Messages
7
Hey all :)

I'm trying to open some .avi files on my computer through an Excel program of mine, but every time I try, it pops up this annoying hyperlink warning:

"Opening

Some files can contain viruses or otherwise be harmful to your computer.

It is important to be certain that this file comes from a trustworthy source.

Would you like to open this file?"


Now after some Googling, I managed to find a number of sites suggesting to add a DWORD Value to the Registry of the Microsoft Office entry, in the following location:

HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Common\Secuirty

N.B. My path to this key was actually 14.0 instead of 12.0 due to having Office 2010 installed on this machine, so hopefully this doesn't effect the following process.

Name it "DisableHyperlinkWarning" (without quotes) and set the value to 1 and make sure it's a decimal value, not a hexidecimal.

After following this method, it still is popping up this annoying warning message. Does anyone have any other methods that can disable this?
 
Last edited:

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Well now don't I feel a bit redundant. I managed to find a solution online for another aspect of my project that is applicable across all hyperlinks.

For those having a similar problem or want a slightly more controllable method of opening an URL, I managed to find this beauty of a function:

Code:
Option Explicit
 
Enum W32_Window_State
    Show_Normal = 1
    Show_Minimized = 2
    Show_Maximized = 3
    Show_Min_No_Active = 7
    Show_Default = 10
End Enum
 
Private Declare Function ShellExecute Lib "shell32.dll" _
Alias "ShellExecuteA" (ByVal hWnd As Long, _
ByVal lpOperation As String, ByVal lpFile As String, _
ByVal lpParameters As String, ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
 
Function OpenURL(URL As String, WindowState As W32_Window_State) As Boolean
     
    'Opens passed URL with default application, or Error Code (<32) upon error
     
    Dim lngHWnd As Long
    Dim lngReturn As Long
     
    lngReturn = ShellExecute(lngHWnd, "open", URL, vbNullString, _
    vbNullString, WindowState)
     
    OpenURL = (lngReturn > 32)
     
End Function
In order to use the function, all you have to do is call it within a macro:

Code:
OpenURL "http://www.mrexcel.com/", Show_Maximized
The great thing about this code is that it opens the URL in your default program, so if it's a web address, it'll use your default browser (Firefox for me) and if it's a file on your computer (such as an .avi file), it'll use your default media program (VLC for me).

The WindowState is also great for making sure the program starts in default/minimized/maximized etc.

Hope that helps other people :)
 
Upvote 0
How were you originally trying to open the hyperlinks?

ie what was the code causing the problem?
 
Upvote 0
Just the built in hyperlink function:

Code:
ActiveWorkbook.FollowHyperlink Address:= etc etc

Probably not the greatest way of doing, but solved the problem now anyways :)
 
Upvote 0
That's what I thought you were using.:)

Mind you I wouldn't recommend changing things in the registery for something like this, unless of course it's totally essential.

Changing something there could affect not just Excel but your entire system.

At least back up the registery if you are going to try it.
 
Upvote 0
Yeah, after a less than fortunate experience with RegEdit a few years ago, I always make backups if I decide to go in there and start messing around with things.

But the custom function I pasted above is absolutely awesome for what I need to do :D
 
Upvote 0
Hello, I'm having the same problem with the hyperlink warning message on Excel 2010. I also tried the Microsoft recommended regedit with no success. I really need to disable these and would like to try what you used, but unfortunately it is all Greek to me. Is this fairly simple to do? I could use some instruction. THanks in advance.
John
 
Upvote 0
Bump. I'm having the same issue with the warning.

Code:
OpenURL "http://www.mrexcel.com/", Show_Maximized

This will only work if I put the name of the hyperlink in code though. What if I have hundreds of hyperlinks already on the sheet and wish to open them.
 
Upvote 0
Here is my code to open hyperlinks.

Code:
Sub Hyperlink_Open()

Dim cCell As Range
Set cCell = Selection.Cells(1, 1)

If cCell.Hyperlinks.Count > 0 Then
    cCell.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
Else
    MsgBox "Please select a hyperlink"
End If
End Sub

How would I incorporate "Show_Maximized" into this code?
 
Upvote 0

Forum statistics

Threads
1,223,936
Messages
6,175,507
Members
452,650
Latest member
Tinfish

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top