PDA

View Full Version : How to stop opening a dialogue box?



arrun
10-22-2011, 12:48 AM
Dear all, in my Excel sheet I have put one hyper-link. However whenever I click that link, one dialogue box appears saying: "some file can contain viruses or otherwise be harmful to you computer (this dialogue box can be found here 'http://www.2shared.com/photo/xxKK1YcT/Snap.html')". Once I okay it, then that link pops-up.

Here my question is: can I stop opening this dialogue box, hence directly let that link to work? Is it possible programmatically or by any other means?

However I want to stop opening just this dialogue box, not anything else.

Thanks for your help.

Paul_Hossler
10-22-2011, 08:44 AM
Not sure if this will surpress that particular dialogbox, but you can give it a try


Application.DisplayAlerts = False

your code

Application.DisplayAlerts = True

Paul

arrun
10-22-2011, 09:04 AM
Thanks Paul for your reply. Where should I put that code? I have put that line of code in the code window of 'ThisWorkbook', however nothing happens.

Thanks,

Paul_Hossler
10-22-2011, 12:34 PM
This might not work for what you want to do. It runs off a command button.

Also the "some file can contain viruses ..." dialog might not even be supress-able


Option Explicit
Private Sub CommandButton1_Click()
Application.DisplayAlerts = False
ActiveSheet.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
Application.DisplayAlerts = True
End Sub


Paul

mdmackillop
10-23-2011, 05:48 AM
A registry change solution, but at your own risk, see here (http://support.microsoft.com/kb/925757)