Removing Alert Message when running VBScripts through Excel

3Ply75

New Member
Joined
Aug 24, 2016
Messages
10
Hey gang, I'm running Excel 2013 and trying to have it run VBScripts through a macro. Here is the line of code that runs the script:

ActiveWorkbook.FollowHyperlink Address:="[file location]\DGA-15.vbs", NewWindow:=True

([file location] is just the location on the hard drive)

The script runs just fine but my issue is the popup that occurs when you run a script:

WYbsa.png


I've tried the following to remove this alert (as I'd like to run multiple scripts from a single Excel macro and don't want to have to deal with this popup 5 or 6 times per macro):

Excel Settings
-(Macro Settings) Enabled All Macros and checked the Trust Access to the VBA Project Object Model checkbox
-(Privacy Options) Unchecked the "Check Microsoft Office Documents that are from or link to suspicious Web sites" box

Registry Edits
-Disabled the DisableHyperlinkWarning in the HKEY\SOFTWARE\MICRO\OFFICE\15\SECU\COMMON registry (I disabled them all in all versions of Office just to be sure)
Created a VBA code to the same:

(CreateObject("Wscript.Shell").RegWrite _
"HKCU\Software\Microsoft\Office" & Application.Version & _
"\Common\Security\DisableHyperlinkWarning", 1, "REG_DWORD")

Spent too much time on Google trying to find the answer to simply disable this alert from popping up. I'm beginning to think there isn't an answer, but if anyone has a work-around to just click "OK" when it appears, that will work just as well too.

Basically I just want to run multiple VBScripts from an Excel macro without having to have my users click this stupid popup box every few seconds while the whole process waits for them to do it.

Thanks gang, I look forward to any tips you might have.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Welcome to the Board!

Have you tried disabling the alerts?

Just before that line of code you posted, add this line:
Code:
Application.DisplayAlerts = False
Then turn alerts back on after that line by reversing it like this:
Code:
Application.DisplayAlerts = True
 
Upvote 0
Welcome to the Board!

Have you tried disabling the alerts?

Just before that line of code you posted, add this line:
Code:
Application.DisplayAlerts = False
Then turn alerts back on after that line by reversing it like this:
Code:
Application.DisplayAlerts = True

I just did and no luck with that either. I think I've tried that before but I just double checked and I'm still getting the popup :(
 
Upvote 0
Guess I have stumped the internet. Got the same response when I asked what color Spock's earwax is...
 
Upvote 0

Forum statistics

Threads
1,215,523
Messages
6,125,318
Members
449,218
Latest member
Excel Master

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