![]() |
How Do You Stop Annoying Excel Message Boxes?
I have a worksheet with a hyperlink to a program outside Excel. This is
working fine at this point with one exception. Every time you click on the link Excel puts up a message box stating the following: €œSome files can contain viruses or otherwise be harmful to your computer. It is important to be certain that this file is from a trustworthy source. Would you like to open this file?€ This is really irritating , as it pops up every time. How can I stop it popping up? I looked on the net and somebody suggested this might work : Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.DisplayAlerts = True End Sub Private Sub Workbook_Open() Application.DisplayAlerts = False End Sub The problem is that i would have no idea where to place this , or enact it , in Excel. Can someone help? Thanks |
How Do You Stop Annoying Excel Message Boxes?
Hey Colin
ok, try following: Right-Click on one of the Tabs of your workbook and click "view Code" Then the VB-Editor should open. If you don't see the Project-Explorer (usually on the left side) press Ctrl + R. In the Project Explorer double click on "ThisWorkbook" and then enter the code you posted. Try it and tell me if it works or not. Cheers Carlo On Jan 7, 9:33 am, Colin Hayes wrote: I have a worksheet with a hyperlink to a program outside Excel. This is working fine at this point with one exception. Every time you click on the link Excel puts up a message box stating the following: "Some files can contain viruses or otherwise be harmful to your computer. It is important to be certain that this file is from a trustworthy source. Would you like to open this file?" This is really irritating , as it pops up every time. How can I stop it popping up? I looked on the net and somebody suggested this might work : Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.DisplayAlerts = True End Sub Private Sub Workbook_Open() Application.DisplayAlerts = False End Sub The problem is that i would have no idea where to place this , or enact it , in Excel. Can someone help? Thanks |
How Do You Stop Annoying Excel Message Boxes?
Hi Carlo OK I tried it , but no joy , I'm afraid. It still pops up. I put the code in exactly where you suggested and saved and re-opened. It happens whenever I try to use a hyperlink to a program outside Excel. Perhaps you could try it out yourself and see if you can get it working. I'm sure there must be a way. Best Wishes In article , carlo writes Hey Colin ok, try following: Right-Click on one of the Tabs of your workbook and click "view Code" Then the VB-Editor should open. If you don't see the Project-Explorer (usually on the left side) press Ctrl + R. In the Project Explorer double click on "ThisWorkbook" and then enter the code you posted. Try it and tell me if it works or not. Cheers Carlo On Jan 7, 9:33 am, Colin Hayes wrote: I have a worksheet with a hyperlink to a program outside Excel. This is working fine at this point with one exception. Every time you click on the link Excel puts up a message box stating the following: "Some files can contain viruses or otherwise be harmful to your computer. It is important to be certain that this file is from a trustworthy source. Would you like to open this file?" This is really irritating , as it pops up every time. How can I stop it popping up? I looked on the net and somebody suggested this might work : Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.DisplayAlerts = True End Sub Private Sub Workbook_Open() Application.DisplayAlerts = False End Sub The problem is that i would have no idea where to place this , or enact it , in Excel. Can someone help? Thanks |
How Do You Stop Annoying Excel Message Boxes?
Sounds like a macro security alert. If you change your setting to
lower macro security, you won't get that message. Does the workbook you're opening contain macros? On Jan 6, 7:33 pm, Colin Hayes wrote: I have a worksheet with a hyperlink to a program outside Excel. This is working fine at this point with one exception. Every time you click on the link Excel puts up a message box stating the following: "Some files can contain viruses or otherwise be harmful to your computer. It is important to be certain that this file is from a trustworthy source. Would you like to open this file?" This is really irritating , as it pops up every time. How can I stop it popping up? I looked on the net and somebody suggested this might work : Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.DisplayAlerts = True End Sub Private Sub Workbook_Open() Application.DisplayAlerts = False End Sub The problem is that i would have no idea where to place this , or enact it , in Excel. Can someone help? Thanks |
How Do You Stop Annoying Excel Message Boxes?
In article
, ilia writes Sounds like a macro security alert. If you change your setting to lower macro security, you won't get that message. Does the workbook you're opening contain macros? Hi I have my security set to the lowest level , and run macros without interruption. It's an Office virus reminder which only pops up when you try to hyperlink to an outside file or program. If you set up a hyperlink to anything outside Excel , you'll see it pop up every time. I read reports on the net of successful suppression , but am unable to effect this myself. Any help appreciated. Best wishes. On Jan 6, 7:33 pm, Colin Hayes wrote: I have a worksheet with a hyperlink to a program outside Excel. This is working fine at this point with one exception. Every time you click on the link Excel puts up a message box stating the following: "Some files can contain viruses or otherwise be harmful to your computer. It is important to be certain that this file is from a trustworthy source. Would you like to open this file?" This is really irritating , as it pops up every time. How can I stop it popping up? I looked on the net and somebody suggested this might work : Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.DisplayAlerts = True End Sub Private Sub Workbook_Open() Application.DisplayAlerts = False End Sub The problem is that i would have no idea where to place this , or enact it , in Excel. Can someone help? Thanks |
How Do You Stop Annoying Excel Message Boxes?
What version of excel are you using.
You can tweak the windows registry in xl2003 and stop that warning. Saved from a Jim Rech post: Close Excel Windows start button|Run Regedit (click ok) Navigate to this key in the left panel: HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\C ommon\Security If you do not have a Security key under Common (I didn't) create it by right-clicking on Common and picking New and Key. Give it the name Security. After creating Security, select it in the left panel and in the empty right panel right-click anywhere and select New and Dword value. Give it the name: DisableHyperlinkWarning and press Enter. This entry will have the value 0. Double-click it and change the value to 1 and press Enter. You can close Regedit. And Excel 2003 should not give the warning any more. Colin Hayes wrote: I have a worksheet with a hyperlink to a program outside Excel. This is working fine at this point with one exception. Every time you click on the link Excel puts up a message box stating the following: €œSome files can contain viruses or otherwise be harmful to your computer. It is important to be certain that this file is from a trustworthy source. Would you like to open this file?€ This is really irritating , as it pops up every time. How can I stop it popping up? I looked on the net and somebody suggested this might work : Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.DisplayAlerts = True End Sub Private Sub Workbook_Open() Application.DisplayAlerts = False End Sub The problem is that i would have no idea where to place this , or enact it , in Excel. Can someone help? Thanks -- Dave Peterson |
How Do You Stop Annoying Excel Message Boxes?
Colin
That message comes up before the workbook is opened so code will not fire. Have a look at this KB Article for disabling that "some files may contain viruses" message in Office 2003 http://support.microsoft.com/kb/829072/en-us Gord Dibben MS Excel MVP On Mon, 7 Jan 2008 00:33:50 +0000, Colin Hayes wrote: I have a worksheet with a hyperlink to a program outside Excel. This is working fine at this point with one exception. Every time you click on the link Excel puts up a message box stating the following: “Some files can contain viruses or otherwise be harmful to your computer. It is important to be certain that this file is from a trustworthy source. Would you like to open this file?” This is really irritating , as it pops up every time. How can I stop it popping up? I looked on the net and somebody suggested this might work : Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.DisplayAlerts = True End Sub Private Sub Workbook_Open() Application.DisplayAlerts = False End Sub The problem is that i would have no idea where to place this , or enact it , in Excel. Can someone help? Thanks |
How Do You Stop Annoying Excel Message Boxes?
Hi Dave OK Thanks for that. I think we're a little closer now. Is there a small batch or .exe file in existence to carry out these steps automatically , I wonder? Or would it be hard to create one? I'm a little wary of going into the registry myself and changing things around like this. Best Wishes Colin In article , Dave Peterson writes What version of excel are you using. You can tweak the windows registry in xl2003 and stop that warning. Saved from a Jim Rech post: Close Excel Windows start button|Run Regedit (click ok) Navigate to this key in the left panel: HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\ Common\Security If you do not have a Security key under Common (I didn't) create it by right-clicking on Common and picking New and Key. Give it the name Security. After creating Security, select it in the left panel and in the empty right panel right-click anywhere and select New and Dword value. Give it the name: DisableHyperlinkWarning and press Enter. This entry will have the value 0. Double-click it and change the value to 1 and press Enter. You can close Regedit. And Excel 2003 should not give the warning any more. Colin Hayes wrote: I have a worksheet with a hyperlink to a program outside Excel. This is working fine at this point with one exception. Every time you click on the link Excel puts up a message box stating the following: €œSome files can contain viruses or otherwise be harmful to your computer. It is important to be certain that this file is from a trustworthy source. Would you like to open this file?€? This is really irritating , as it pops up every time. How can I stop it popping up? I looked on the net and somebody suggested this might work : Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.DisplayAlerts = True End Sub Private Sub Workbook_Open() Application.DisplayAlerts = False End Sub The problem is that i would have no idea where to place this , or enact it , in Excel. Can someone help? Thanks |
How Do You Stop Annoying Excel Message Boxes?
This is specific to xl2003.
Open Notepad Paste the following 3 lines: Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\C ommon\Security] "DisableHyperlinkWarning"=dword:00000001 Save that file with an extension of .reg (DisableHyperWarning.Reg, for example) Double click on that .reg file and you should get a message back whether it was successful or not. Colin Hayes wrote: Hi Dave OK Thanks for that. I think we're a little closer now. Is there a small batch or .exe file in existence to carry out these steps automatically , I wonder? Or would it be hard to create one? I'm a little wary of going into the registry myself and changing things around like this. Best Wishes Colin In article , Dave Peterson writes What version of excel are you using. You can tweak the windows registry in xl2003 and stop that warning. Saved from a Jim Rech post: Close Excel Windows start button|Run Regedit (click ok) Navigate to this key in the left panel: HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\ Common\Security If you do not have a Security key under Common (I didn't) create it by right-clicking on Common and picking New and Key. Give it the name Security. After creating Security, select it in the left panel and in the empty right panel right-click anywhere and select New and Dword value. Give it the name: DisableHyperlinkWarning and press Enter. This entry will have the value 0. Double-click it and change the value to 1 and press Enter. You can close Regedit. And Excel 2003 should not give the warning any more. Colin Hayes wrote: I have a worksheet with a hyperlink to a program outside Excel. This is working fine at this point with one exception. Every time you click on the link Excel puts up a message box stating the following: €œSome files can contain viruses or otherwise be harmful to your computer. It is important to be certain that this file is from a trustworthy source. Would you like to open this file?€? This is really irritating , as it pops up every time. How can I stop it popping up? I looked on the net and somebody suggested this might work : Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.DisplayAlerts = True End Sub Private Sub Workbook_Open() Application.DisplayAlerts = False End Sub The problem is that i would have no idea where to place this , or enact it , in Excel. Can someone help? Thanks -- Dave Peterson |
How Do You Stop Annoying Excel Message Boxes?
H Dave Thanks for this. Didn't work though , unfortunately. I pasted the text , and saved as you suggested and ran it. It asked me if I really wanted to enter this information into the registry , so I clicked OK and then it said that it had successfully entered the information. I rebooted and .... I still get the popup! How frustrating! It's definitely xl2003 I'm running. What do you think? Best Wishes In article , Dave Peterson writes This is specific to xl2003. Open Notepad Paste the following 3 lines: Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\C ommon\Security] "DisableHyperlinkWarning"=dword:00000001 Save that file with an extension of .reg (DisableHyperWarning.Reg, for example) Double click on that .reg file and you should get a message back whether it was successful or not. Colin Hayes wrote: Hi Dave OK Thanks for that. I think we're a little closer now. Is there a small batch or .exe file in existence to carry out these steps automatically , I wonder? Or would it be hard to create one? I'm a little wary of going into the registry myself and changing things around like this. Best Wishes Colin In article , Dave Peterson writes What version of excel are you using. You can tweak the windows registry in xl2003 and stop that warning. Saved from a Jim Rech post: Close Excel Windows start button|Run Regedit (click ok) Navigate to this key in the left panel: HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\ Common\Security If you do not have a Security key under Common (I didn't) create it by right-clicking on Common and picking New and Key. Give it the name Security. After creating Security, select it in the left panel and in the empty right panel right-click anywhere and select New and Dword value. Give it the name: DisableHyperlinkWarning and press Enter. This entry will have the value 0. Double-click it and change the value to 1 and press Enter. You can close Regedit. And Excel 2003 should not give the warning any more. Colin Hayes wrote: I have a worksheet with a hyperlink to a program outside Excel. This is working fine at this point with one exception. Every time you click on the link Excel puts up a message box stating the following: €ŀœSome files can contain viruses or otherwise be harmful to your computer. It is important to be certain that this file is from a trustworthy source. Would you like to open this file?€? This is really irritating , as it pops up every time. How can I stop it popping up? I looked on the net and somebody suggested this might work : Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.DisplayAlerts = True End Sub Private Sub Workbook_Open() Application.DisplayAlerts = False End Sub The problem is that i would have no idea where to place this , or enact it , in Excel. Can someone help? Thanks |
How Do You Stop Annoying Excel Message Boxes?
Colin
I will email you a small *.reg file which you can merge into the registry. I will name it disable.txt because your email client probably won't accept *.reg files. After receiving it, change the extension to .reg Right-click on it and "Merge" Will add the DisableHyperlinksWarning with Dword value of 1 Gord On Mon, 7 Jan 2008 20:10:08 +0000, Colin Hayes wrote: Hi Dave OK Thanks for that. I think we're a little closer now. Is there a small batch or .exe file in existence to carry out these steps automatically , I wonder? Or would it be hard to create one? I'm a little wary of going into the registry myself and changing things around like this. Best Wishes Colin In article , Dave Peterson writes What version of excel are you using. You can tweak the windows registry in xl2003 and stop that warning. Saved from a Jim Rech post: Close Excel Windows start button|Run Regedit (click ok) Navigate to this key in the left panel: HKEY_CURRENT_USER\Software\Microsoft\Office\11.0 \Common\Security If you do not have a Security key under Common (I didn't) create it by right-clicking on Common and picking New and Key. Give it the name Security. After creating Security, select it in the left panel and in the empty right panel right-click anywhere and select New and Dword value. Give it the name: DisableHyperlinkWarning and press Enter. This entry will have the value 0. Double-click it and change the value to 1 and press Enter. You can close Regedit. And Excel 2003 should not give the warning any more. Colin Hayes wrote: I have a worksheet with a hyperlink to a program outside Excel. This is working fine at this point with one exception. Every time you click on the link Excel puts up a message box stating the following: €œSome files can contain viruses or otherwise be harmful to your computer. It is important to be certain that this file is from a trustworthy source. Would you like to open this file?€? This is really irritating , as it pops up every time. How can I stop it popping up? I looked on the net and somebody suggested this might work : Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.DisplayAlerts = True End Sub Private Sub Workbook_Open() Application.DisplayAlerts = False End Sub The problem is that i would have no idea where to place this , or enact it , in Excel. Can someone help? Thanks |
How Do You Stop Annoying Excel Message Boxes?
I don't have a guess.
Maybe reading the link to the MSKB article that Gord posted would help? Ron de Bruin is updating his site for a different registry tweak. He has some pictures of how to do this tweaking--but for a different key. It may help. http://www.rondebruin.nl/password2007.htm Colin Hayes wrote: H Dave Thanks for this. Didn't work though , unfortunately. I pasted the text , and saved as you suggested and ran it. It asked me if I really wanted to enter this information into the registry , so I clicked OK and then it said that it had successfully entered the information. I rebooted and .... I still get the popup! How frustrating! It's definitely xl2003 I'm running. What do you think? Best Wishes In article , Dave Peterson writes This is specific to xl2003. Open Notepad Paste the following 3 lines: Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\C ommon\Security] "DisableHyperlinkWarning"=dword:00000001 Save that file with an extension of .reg (DisableHyperWarning.Reg, for example) Double click on that .reg file and you should get a message back whether it was successful or not. Colin Hayes wrote: Hi Dave OK Thanks for that. I think we're a little closer now. Is there a small batch or .exe file in existence to carry out these steps automatically , I wonder? Or would it be hard to create one? I'm a little wary of going into the registry myself and changing things around like this. Best Wishes Colin In article , Dave Peterson writes What version of excel are you using. You can tweak the windows registry in xl2003 and stop that warning. Saved from a Jim Rech post: Close Excel Windows start button|Run Regedit (click ok) Navigate to this key in the left panel: HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\ Common\Security If you do not have a Security key under Common (I didn't) create it by right-clicking on Common and picking New and Key. Give it the name Security. After creating Security, select it in the left panel and in the empty right panel right-click anywhere and select New and Dword value. Give it the name: DisableHyperlinkWarning and press Enter. This entry will have the value 0. Double-click it and change the value to 1 and press Enter. You can close Regedit. And Excel 2003 should not give the warning any more. Colin Hayes wrote: I have a worksheet with a hyperlink to a program outside Excel. This is working fine at this point with one exception. Every time you click on the link Excel puts up a message box stating the following: €ŀœSome files can contain viruses or otherwise be harmful to your computer. It is important to be certain that this file is from a trustworthy source. Would you like to open this file?€? This is really irritating , as it pops up every time. How can I stop it popping up? I looked on the net and somebody suggested this might work : Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.DisplayAlerts = True End Sub Private Sub Workbook_Open() Application.DisplayAlerts = False End Sub The problem is that i would have no idea where to place this , or enact it , in Excel. Can someone help? Thanks -- Dave Peterson |
How Do You Stop Annoying Excel Message Boxes?
Hi Dave OK Thanks. Ron's page is for a different issue and wouldn't solve this one , unfortunately. This a very stubborn popup. I did actually look in the registry and can see your amendment sitting there exactly correctly , but for some reason it's not having the desire effect. I wonder if there's some switch elsewhere which is counter-manding it? Best Wishes In article , Dave Peterson writes I don't have a guess. Maybe reading the link to the MSKB article that Gord posted would help? Ron de Bruin is updating his site for a different registry tweak. He has some pictures of how to do this tweaking--but for a different key. It may help. http://www.rondebruin.nl/password2007.htm Colin Hayes wrote: H Dave Thanks for this. Didn't work though , unfortunately. I pasted the text , and saved as you suggested and ran it. It asked me if I really wanted to enter this information into the registry , so I clicked OK and then it said that it had successfully entered the information. I rebooted and .... I still get the popup! How frustrating! It's definitely xl2003 I'm running. What do you think? Best Wishes In article , Dave Peterson writes This is specific to xl2003. Open Notepad Paste the following 3 lines: Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\C ommon\Security] "DisableHyperlinkWarning"=dword:00000001 Save that file with an extension of .reg (DisableHyperWarning.Reg, for example) Double click on that .reg file and you should get a message back whether it was successful or not. Colin Hayes wrote: Hi Dave OK Thanks for that. I think we're a little closer now. Is there a small batch or .exe file in existence to carry out these steps automatically , I wonder? Or would it be hard to create one? I'm a little wary of going into the registry myself and changing things around like this. Best Wishes Colin In article , Dave Peterson writes What version of excel are you using. You can tweak the windows registry in xl2003 and stop that warning. Saved from a Jim Rech post: Close Excel Windows start button|Run Regedit (click ok) Navigate to this key in the left panel: HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\ Common\Security If you do not have a Security key under Common (I didn't) create it by right-clicking on Common and picking New and Key. Give it the name Security. After creating Security, select it in the left panel and in the empty right panel right-click anywhere and select New and Dword value. Give it the name: DisableHyperlinkWarning and press Enter. This entry will have the value 0. Double-click it and change the value to 1 and press Enter. You can close Regedit. And Excel 2003 should not give the warning any more. Colin Hayes wrote: I have a worksheet with a hyperlink to a program outside Excel. This is working fine at this point with one exception. Every time you click on the link Excel puts up a message box stating the following: €À¦Ã¢‚¬Å“Some files can contain viruses or otherwise be harmful to your computer. It is important to be certain that this file is from a trustworthy source. Would you like to open this file?€? This is really irritating , as it pops up every time. How can I stop it popping up? I looked on the net and somebody suggested this might work : Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.DisplayAlerts = True End Sub Private Sub Workbook_Open() Application.DisplayAlerts = False End Sub The problem is that i would have no idea where to place this , or enact it , in Excel. Can someone help? Thanks |
How Do You Stop Annoying Excel Message Boxes?
I suggested looking at Ron's page to see how you'd start regedit--not for the
actual tweak. And I don't know of any other thing to try. Colin Hayes wrote: Hi Dave OK Thanks. Ron's page is for a different issue and wouldn't solve this one , unfortunately. This a very stubborn popup. I did actually look in the registry and can see your amendment sitting there exactly correctly , but for some reason it's not having the desire effect. I wonder if there's some switch elsewhere which is counter-manding it? Best Wishes In article , Dave Peterson writes I don't have a guess. Maybe reading the link to the MSKB article that Gord posted would help? Ron de Bruin is updating his site for a different registry tweak. He has some pictures of how to do this tweaking--but for a different key. It may help. http://www.rondebruin.nl/password2007.htm Colin Hayes wrote: H Dave Thanks for this. Didn't work though , unfortunately. I pasted the text , and saved as you suggested and ran it. It asked me if I really wanted to enter this information into the registry , so I clicked OK and then it said that it had successfully entered the information. I rebooted and .... I still get the popup! How frustrating! It's definitely xl2003 I'm running. What do you think? Best Wishes In article , Dave Peterson writes This is specific to xl2003. Open Notepad Paste the following 3 lines: Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\C ommon\Security] "DisableHyperlinkWarning"=dword:00000001 Save that file with an extension of .reg (DisableHyperWarning.Reg, for example) Double click on that .reg file and you should get a message back whether it was successful or not. Colin Hayes wrote: Hi Dave OK Thanks for that. I think we're a little closer now. Is there a small batch or .exe file in existence to carry out these steps automatically , I wonder? Or would it be hard to create one? I'm a little wary of going into the registry myself and changing things around like this. Best Wishes Colin In article , Dave Peterson writes What version of excel are you using. You can tweak the windows registry in xl2003 and stop that warning. Saved from a Jim Rech post: Close Excel Windows start button|Run Regedit (click ok) Navigate to this key in the left panel: HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\ Common\Security If you do not have a Security key under Common (I didn't) create it by right-clicking on Common and picking New and Key. Give it the name Security. After creating Security, select it in the left panel and in the empty right panel right-click anywhere and select New and Dword value. Give it the name: DisableHyperlinkWarning and press Enter. This entry will have the value 0. Double-click it and change the value to 1 and press Enter. You can close Regedit. And Excel 2003 should not give the warning any more. Colin Hayes wrote: I have a worksheet with a hyperlink to a program outside Excel. This is working fine at this point with one exception. Every time you click on the link Excel puts up a message box stating the following: €À¦Ã¢‚¬Å“Some files can contain viruses or otherwise be harmful to your computer. It is important to be certain that this file is from a trustworthy source. Would you like to open this file?€? This is really irritating , as it pops up every time. How can I stop it popping up? I looked on the net and somebody suggested this might work : Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.DisplayAlerts = True End Sub Private Sub Workbook_Open() Application.DisplayAlerts = False End Sub The problem is that i would have no idea where to place this , or enact it , in Excel. Can someone help? Thanks -- Dave Peterson |
How Do You Stop Annoying Excel Message Boxes?
In article , Dave Peterson
writes I suggested looking at Ron's page to see how you'd start regedit--not for the actual tweak. And I don't know of any other thing to try. Hi Dave Thanks for the reg fix. It worked fine. I saw on this page that an extra switch does sometimes needs changing to make it work in some circumstances: http://support.microsoft.com/kb/829072/en-us in the Method 1: Turn off the "Confirm open after download" section I followed this and , coupled with your fix , it did the trick. The popups no longer appear for the file types specified. Curious that the .exe extension doesn't appear in the Registered File Type list , though. Best Wishes Colin Hayes wrote: Hi Dave OK Thanks. Ron's page is for a different issue and wouldn't solve this one , unfortunately. This a very stubborn popup. I did actually look in the registry and can see your amendment sitting there exactly correctly , but for some reason it's not having the desire effect. I wonder if there's some switch elsewhere which is counter-manding it? Best Wishes In article , Dave Peterson writes I don't have a guess. Maybe reading the link to the MSKB article that Gord posted would help? Ron de Bruin is updating his site for a different registry tweak. He has some pictures of how to do this tweaking--but for a different key. It may help. http://www.rondebruin.nl/password2007.htm Colin Hayes wrote: H Dave Thanks for this. Didn't work though , unfortunately. I pasted the text , and saved as you suggested and ran it. It asked me if I really wanted to enter this information into the registry , so I clicked OK and then it said that it had successfully entered the information. I rebooted and .... I still get the popup! How frustrating! It's definitely xl2003 I'm running. What do you think? Best Wishes In article , Dave Peterson writes This is specific to xl2003. Open Notepad Paste the following 3 lines: Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\C ommon\Security] "DisableHyperlinkWarning"=dword:00000001 Save that file with an extension of .reg (DisableHyperWarning.Reg, for example) Double click on that .reg file and you should get a message back whether it was successful or not. Colin Hayes wrote: Hi Dave OK Thanks for that. I think we're a little closer now. Is there a small batch or .exe file in existence to carry out these steps automatically , I wonder? Or would it be hard to create one? I'm a little wary of going into the registry myself and changing things around like this. Best Wishes Colin In article , Dave Peterson writes What version of excel are you using. You can tweak the windows registry in xl2003 and stop that warning. Saved from a Jim Rech post: Close Excel Windows start button|Run Regedit (click ok) Navigate to this key in the left panel: HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\ Common\Secur ity If you do not have a Security key under Common (I didn't) create it by right-clicking on Common and picking New and Key. Give it the name Security. After creating Security, select it in the left panel and in the empty right panel right-click anywhere and select New and Dword value. Give it the name: DisableHyperlinkWarning and press Enter. This entry will have the value 0. Double-click it and change the value to 1 and press Enter. You can close Regedit. And Excel 2003 should not give the warning any more. Colin Hayes wrote: I have a worksheet with a hyperlink to a program outside Excel. This is working fine at this point with one exception. Every time you click on the link Excel puts up a message box stating the following: ÃÆÃ€šÃ‚¢ÃƒÂ¢Ã¢â€šÂ¬Ã…¡Ã€šÃ‚¬ À¦Ã¢â€šÂ¬Ã…€œSome files can contain viruses or otherwise be harmful to your computer. It is important to be certain that this file is from a trustworthy source. Would you like to open this file?ÃÆÃ€šÃ‚¢ÃƒÂ¢Ã¢â€šÂ¬Ã…¡Ã€ šÃ‚¬? This is really irritating , as it pops up every time. How can I stop it popping up? I looked on the net and somebody suggested this might work : Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.DisplayAlerts = True End Sub Private Sub Workbook_Open() Application.DisplayAlerts = False End Sub The problem is that i would have no idea where to place this , or enact it , in Excel. Can someone help? Thanks |
How Do You Stop Annoying Excel Message Boxes?
Glad you got it working.
Since there is no single program associated with .exe files, I'm not surprised it doesn't appear in that list. Colin Hayes wrote: In article , Dave Peterson writes I suggested looking at Ron's page to see how you'd start regedit--not for the actual tweak. And I don't know of any other thing to try. Hi Dave Thanks for the reg fix. It worked fine. I saw on this page that an extra switch does sometimes needs changing to make it work in some circumstances: http://support.microsoft.com/kb/829072/en-us in the Method 1: Turn off the "Confirm open after download" section I followed this and , coupled with your fix , it did the trick. The popups no longer appear for the file types specified. Curious that the .exe extension doesn't appear in the Registered File Type list , though. Best Wishes Colin Hayes wrote: Hi Dave OK Thanks. Ron's page is for a different issue and wouldn't solve this one , unfortunately. This a very stubborn popup. I did actually look in the registry and can see your amendment sitting there exactly correctly , but for some reason it's not having the desire effect. I wonder if there's some switch elsewhere which is counter-manding it? Best Wishes In article , Dave Peterson writes I don't have a guess. Maybe reading the link to the MSKB article that Gord posted would help? Ron de Bruin is updating his site for a different registry tweak. He has some pictures of how to do this tweaking--but for a different key. It may help. http://www.rondebruin.nl/password2007.htm Colin Hayes wrote: H Dave Thanks for this. Didn't work though , unfortunately. I pasted the text , and saved as you suggested and ran it. It asked me if I really wanted to enter this information into the registry , so I clicked OK and then it said that it had successfully entered the information. I rebooted and .... I still get the popup! How frustrating! It's definitely xl2003 I'm running. What do you think? Best Wishes In article , Dave Peterson writes This is specific to xl2003. Open Notepad Paste the following 3 lines: Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\C ommon\Security] "DisableHyperlinkWarning"=dword:00000001 Save that file with an extension of .reg (DisableHyperWarning.Reg, for example) Double click on that .reg file and you should get a message back whether it was successful or not. Colin Hayes wrote: Hi Dave OK Thanks for that. I think we're a little closer now. Is there a small batch or .exe file in existence to carry out these steps automatically , I wonder? Or would it be hard to create one? I'm a little wary of going into the registry myself and changing things around like this. Best Wishes Colin In article , Dave Peterson writes What version of excel are you using. You can tweak the windows registry in xl2003 and stop that warning. Saved from a Jim Rech post: Close Excel Windows start button|Run Regedit (click ok) Navigate to this key in the left panel: HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\ Common\Secur ity If you do not have a Security key under Common (I didn't) create it by right-clicking on Common and picking New and Key. Give it the name Security. After creating Security, select it in the left panel and in the empty right panel right-click anywhere and select New and Dword value. Give it the name: DisableHyperlinkWarning and press Enter. This entry will have the value 0. Double-click it and change the value to 1 and press Enter. You can close Regedit. And Excel 2003 should not give the warning any more. Colin Hayes wrote: I have a worksheet with a hyperlink to a program outside Excel. This is working fine at this point with one exception. Every time you click on the link Excel puts up a message box stating the following: ÃÆÃ€šÃ‚¢ÃƒÂ¢Ã¢â€šÂ¬Ã…¡Ã€šÃ‚¬ À¦Ã¢â€šÂ¬Ã…€œSome files can contain viruses or otherwise be harmful to your computer. It is important to be certain that this file is from a trustworthy source. Would you like to open this file?ÃÆÃ€šÃ‚¢ÃƒÂ¢Ã¢â€šÂ¬Ã…¡Ã€ šÃ‚¬? This is really irritating , as it pops up every time. How can I stop it popping up? I looked on the net and somebody suggested this might work : Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.DisplayAlerts = True End Sub Private Sub Workbook_Open() Application.DisplayAlerts = False End Sub The problem is that i would have no idea where to place this , or enact it , in Excel. Can someone help? Thanks -- Dave Peterson |
How Do You Stop Annoying Excel Message Boxes?
In article , Dave Peterson
writes Glad you got it working. Since there is no single program associated with .exe files, I'm not surprised it doesn't appear in that list. Hi Dave Yes , true. I switched off .chm file warning no problem. Wonder how it's possible to turn off the "Confirm open after download" for .exe files , given that hyperlinks out of Excel may well be to applications.... This needs to work in tandem with the .reg file you sent , so could a second (or combined) .reg file also serve to turn off the "Confirm open after download" for .chm , .exe files (or others) all at one go? Best Wishes Colin Hayes wrote: In article , Dave Peterson writes I suggested looking at Ron's page to see how you'd start regedit--not for the actual tweak. And I don't know of any other thing to try. Hi Dave Thanks for the reg fix. It worked fine. I saw on this page that an extra switch does sometimes needs changing to make it work in some circumstances: http://support.microsoft.com/kb/829072/en-us in the Method 1: Turn off the "Confirm open after download" section I followed this and , coupled with your fix , it did the trick. The popups no longer appear for the file types specified. Curious that the .exe extension doesn't appear in the Registered File Type list , though. Best Wishes Colin Hayes wrote: Hi Dave OK Thanks. Ron's page is for a different issue and wouldn't solve this one , unfortunately. This a very stubborn popup. I did actually look in the registry and can see your amendment sitting there exactly correctly , but for some reason it's not having the desire effect. I wonder if there's some switch elsewhere which is counter-manding it? Best Wishes In article , Dave Peterson writes I don't have a guess. Maybe reading the link to the MSKB article that Gord posted would help? Ron de Bruin is updating his site for a different registry tweak. He has some pictures of how to do this tweaking--but for a different key. It may help. http://www.rondebruin.nl/password2007.htm Colin Hayes wrote: H Dave Thanks for this. Didn't work though , unfortunately. I pasted the text , and saved as you suggested and ran it. It asked me if I really wanted to enter this information into the registry , so I clicked OK and then it said that it had successfully entered the information. I rebooted and .... I still get the popup! How frustrating! It's definitely xl2003 I'm running. What do you think? Best Wishes In article , Dave Peterson writes This is specific to xl2003. Open Notepad Paste the following 3 lines: Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\C ommon\Secu rity] "DisableHyperlinkWarning"=dword:00000001 Save that file with an extension of .reg (DisableHyperWarning.Reg, for example) Double click on that .reg file and you should get a message back whether it was successful or not. Colin Hayes wrote: Hi Dave OK Thanks for that. I think we're a little closer now. Is there a small batch or .exe file in existence to carry out these steps automatically , I wonder? Or would it be hard to create one? I'm a little wary of going into the registry myself and changing things around like this. Best Wishes Colin In article , Dave Peterson writes What version of excel are you using. You can tweak the windows registry in xl2003 and stop that warning. Saved from a Jim Rech post: Close Excel Windows start button|Run Regedit (click ok) Navigate to this key in the left panel: HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\ Common\Se cur ity If you do not have a Security key under Common (I didn't) create it by right-clicking on Common and picking New and Key. Give it the name Security. After creating Security, select it in the left panel and in the empty right panel right-click anywhere and select New and Dword value. Give it the name: DisableHyperlinkWarning and press Enter. This entry will have the value 0. Double-click it and change the value to 1 and press Enter. You can close Regedit. And Excel 2003 should not give the warning any more. Colin Hayes wrote: I have a worksheet with a hyperlink to a program outside Excel. This is working fine at this point with one exception. Every time you click on the link Excel puts up a message box stating the following: ÃÆÃ€*€„¢ÃƒÆ’€šÃ€šÃ‚¢ÃƒÆ€ ™Ãƒ€šÃ‚¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚¬Ã€¦Ã‚¡Ãƒâ‚ ¬Å¡Ãƒ€šÃ‚¬ ̢̮‚¬Â¦ÃƒÂ¢Ã¢â‚¬Å¡Ã‚¬Ã €¦Ã¢‚¬Å“Some files can contain viruses or otherwise be harmful to your computer. It is important to be certain that this file is from a trustworthy source. Would you like to open this file?ÃÆÃ€*€„¢ÃƒÆ’€šÃ€šÃ‚Â¢ÃƒÆ ’ÆÃ€šÃ‚¢ €À¦Ã‚¡Ãƒâ‚¬Å¡Ãƒ€šÃ ‚¬? This is really irritating , as it pops up every time. How can I stop it popping up? I looked on the net and somebody suggested this might work : Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.DisplayAlerts = True End Sub Private Sub Workbook_Open() Application.DisplayAlerts = False End Sub The problem is that i would have no idea where to place this , or enact it , in Excel. Can someone help? Thanks |
How Do You Stop Annoying Excel Message Boxes?
Colin Hayes wrote...
I have a worksheet with a hyperlink to a program outside Excel. This is working fine at this point with one exception. Every time you click on the link Excel puts up a message box stating the following: .... This is really irritating , as it pops up every time. How can I stop it popping up? .... Another alternative that would leave standard warnings in place while running outside .EXEs would be to use the FollowHyperlink event handler. Name the cell that will contain the hyperlink RunEXE, insert the hyperlink referring to the defined name RunEXE, so its own cell, then put the following into the class module for the worksheet containing this hyperlink. Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) If Target.SubAddress = "RunEXE" Then _ Shell "c:\winnt\system32\winver.exe", vbNormalFocus End Sub This just runs the Windows version applet, but compare it to a hyperlink referring directly to file:///c:\winnt\system32\winver.exe. |
How Do You Stop Annoying Excel Message Boxes?
Another alternative that would leave standard warnings in place while
running outside .EXEs would be to use the FollowHyperlink event handler. Name the cell that will contain the hyperlink RunEXE, insert the hyperlink referring to the defined name RunEXE, so its own cell, then put the following into the class module for the worksheet containing this hyperlink. Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) If Target.SubAddress = "RunEXE" Then _ Shell "c:\winnt\system32\winver.exe", vbNormalFocus End Sub This just runs the Windows version applet, but compare it to a hyperlink referring directly to file:///c:\winnt\system32\winver.exe. Hi This is very interesting. Could this be extended , I wonder , to cover any hyperlink within a named range of cells? More generic , so that any hyperlink clicked with the named range would be run? So for example If I named B04:M26 as RunEXE, and placed several different hypelinks within this range , could that scenario be accommodated? Thanks |
How Do You Stop Annoying Excel Message Boxes?
I created the .reg file by exporting that branch while in RegEdit. You could do
the same. I don't have a guess how to do what you want with .exe files. Maybe if you asked in another newsgroup--dedicated to MSIE or Windows???--you may get a better answer. Colin Hayes wrote: In article , Dave Peterson writes Glad you got it working. Since there is no single program associated with .exe files, I'm not surprised it doesn't appear in that list. Hi Dave Yes , true. I switched off .chm file warning no problem. Wonder how it's possible to turn off the "Confirm open after download" for .exe files , given that hyperlinks out of Excel may well be to applications.... This needs to work in tandem with the .reg file you sent , so could a second (or combined) .reg file also serve to turn off the "Confirm open after download" for .chm , .exe files (or others) all at one go? Best Wishes Colin Hayes wrote: In article , Dave Peterson writes I suggested looking at Ron's page to see how you'd start regedit--not for the actual tweak. And I don't know of any other thing to try. Hi Dave Thanks for the reg fix. It worked fine. I saw on this page that an extra switch does sometimes needs changing to make it work in some circumstances: http://support.microsoft.com/kb/829072/en-us in the Method 1: Turn off the "Confirm open after download" section I followed this and , coupled with your fix , it did the trick. The popups no longer appear for the file types specified. Curious that the .exe extension doesn't appear in the Registered File Type list , though. Best Wishes Colin Hayes wrote: Hi Dave OK Thanks. Ron's page is for a different issue and wouldn't solve this one , unfortunately. This a very stubborn popup. I did actually look in the registry and can see your amendment sitting there exactly correctly , but for some reason it's not having the desire effect. I wonder if there's some switch elsewhere which is counter-manding it? Best Wishes In article , Dave Peterson writes I don't have a guess. Maybe reading the link to the MSKB article that Gord posted would help? Ron de Bruin is updating his site for a different registry tweak. He has some pictures of how to do this tweaking--but for a different key. It may help. http://www.rondebruin.nl/password2007.htm Colin Hayes wrote: H Dave Thanks for this. Didn't work though , unfortunately. I pasted the text , and saved as you suggested and ran it. It asked me if I really wanted to enter this information into the registry , so I clicked OK and then it said that it had successfully entered the information. I rebooted and .... I still get the popup! How frustrating! It's definitely xl2003 I'm running. What do you think? Best Wishes In article , Dave Peterson writes This is specific to xl2003. Open Notepad Paste the following 3 lines: Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\C ommon\Secu rity] "DisableHyperlinkWarning"=dword:00000001 Save that file with an extension of .reg (DisableHyperWarning.Reg, for example) Double click on that .reg file and you should get a message back whether it was successful or not. Colin Hayes wrote: Hi Dave OK Thanks for that. I think we're a little closer now. Is there a small batch or .exe file in existence to carry out these steps automatically , I wonder? Or would it be hard to create one? I'm a little wary of going into the registry myself and changing things around like this. Best Wishes Colin In article , Dave Peterson writes What version of excel are you using. You can tweak the windows registry in xl2003 and stop that warning. Saved from a Jim Rech post: Close Excel Windows start button|Run Regedit (click ok) Navigate to this key in the left panel: HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\ Common\Se cur ity If you do not have a Security key under Common (I didn't) create it by right-clicking on Common and picking New and Key. Give it the name Security. After creating Security, select it in the left panel and in the empty right panel right-click anywhere and select New and Dword value. Give it the name: DisableHyperlinkWarning and press Enter. This entry will have the value 0. Double-click it and change the value to 1 and press Enter. You can close Regedit. And Excel 2003 should not give the warning any more. Colin Hayes wrote: I have a worksheet with a hyperlink to a program outside Excel. This is working fine at this point with one exception. Every time you click on the link Excel puts up a message box stating the following: ÃÆÃ€ €„¢ÃƒÆ’€šÃ€šÃ‚¢ÃƒÆÃ€šÃ‚¢Ãƒ ¢â€šÂ¬Ã€¦Ã‚¡Ãƒâ‚¬Å¡Ãƒ€šÃ‚¬ ̢̮‚¬Â¦ÃƒÂ¢Ã¢â‚¬Å¡Ã‚¬Ã €¦Ã¢‚¬Å“Some files can contain viruses or otherwise be harmful to your computer. It is important to be certain that this file is from a trustworthy source. Would you like to open this file?ÃÆÃ€ €„¢ÃƒÆ’€šÃ€šÃ‚¢ÃƒÆÃ€šÃ‚¢ €À¦Ã‚¡Ãƒâ‚¬Å¡Ãƒ€šÃ ‚¬? This is really irritating , as it pops up every time. How can I stop it popping up? I looked on the net and somebody suggested this might work : Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.DisplayAlerts = True End Sub Private Sub Workbook_Open() Application.DisplayAlerts = False End Sub The problem is that i would have no idea where to place this , or enact it , in Excel. Can someone help? Thanks -- Dave Peterson |
How Do You Stop Annoying Excel Message Boxes?
Colin Hayes wrote...
.... Could this be extended , I wonder , to cover any hyperlink within a named range of cells? More generic , so that any hyperlink clicked with the named range would be run? .... Define RunEXE as Sheet1!A3:A6 and enter the following into A3:A6. winver calc notepad mspaint Enter foobar into Sheet1!A7. Make each of these a hyperlink pointing to its own cell. Then use the event handler in Sheet1's class module. Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) With Me.Parent.Names("RunEXE") If Not Intersect(Target.Range, .RefersToRange) Is Nothing Then _ Shell Target.Range.Text, vbNormalFocus End With End Sub |
How Do You Stop Annoying Excel Message Boxes?
In article
, Harlan Grove writes Colin Hayes wrote... ... Could this be extended , I wonder , to cover any hyperlink within a named range of cells? More generic , so that any hyperlink clicked with the named range would be run? ... Define RunEXE as Sheet1!A3:A6 and enter the following into A3:A6. winver calc notepad mspaint Enter foobar into Sheet1!A7. Make each of these a hyperlink pointing to its own cell. Then use the event handler in Sheet1's class module. Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) With Me.Parent.Names("RunEXE") If Not Intersect(Target.Range, .RefersToRange) Is Nothing Then _ Shell Target.Range.Text, vbNormalFocus End With End Sub Hi OK Thanks! I set the named area and placed the hyperlinks in. I'm not sure what foobar is I'm afraid , or what you meant by have each point to their own cell. I placed the code under the sheet tab. It's very interesting , but gave mixed results I found. One of the hyperlinks worked perfectly with no popup (!), but another in the Named area gave a VBA run-time error 'file not found'. This line was highlighted in the debugger : Shell Target.Range.Text, vbNormalFocus I tried another sheet with the same results. I Named B4:G19 as RunEXE. I placed 4 hyperlinks in that area , and placed your code under the tab on the sheet. Save , close and reopen. Again , it ran the first hyperlink successfully , but gave the above run-time error for each after. It also selected and highlighted in blue the RunEXE area. I really hope we can get this working because it would be a perfect solution. It's very close. Ideally I'd like to be able to Name a broad range of cells , placing hyperlinks with that area - running each from the hyperlink cell without warning popups , or selecting and highlighting. Grateful for your advice on this. Best Wishes |
How Do You Stop Annoying Excel Message Boxes?
Colin Hayes wrote...
Harlan Grove writes .... Define RunEXE as Sheet1!A3:A6 and enter the following into A3:A6. winver calc notepad mspaint Enter foobar into Sheet1!A7. Make each of these a hyperlink pointing to its own cell. Then use the event handler in Sheet1's class module. Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) With Me.Parent.Names("RunEXE") If Not Intersect(Target.Range, .RefersToRange) Is Nothing Then _ Shell Target.Range.Text, vbNormalFocus End With End Sub .... This was supposed to have set up a range, RunEXE, within which hyperlinks would run external programs based on the cell contents (hyperlink label) of the cells containing the hyperlinks. I included foobar as a hyperlink outside the RunEXE range as a hyperlink that would NOT run via the event handler. . . . I'm not sure . . . what you meant by have each point to their own cell. . . . .... I mean cell A3 initially contains the text 'winver' (without quotes), you move to cell A3, run Insert Hyperlink, link to a Place in This Document and set the cell reference to A3. So the hyperlink refers to the cell containing it. Similarly for cells A4:A7. I used 'points to' instead of 'refers to'. My bad. It's very interesting , but gave mixed results I found. One of the hyperlinks worked perfectly with no popup (!), but another in the Named area gave a VBA run-time error 'file not found'. This line was highlighted in the debugger : Shell Target.Range.Text, vbNormalFocus .... . . . Again , it ran the first hyperlink successfully , but gave the above run-time error for each after. It also selected and highlighted in blue the RunEXE area. Which would indicate that you copied and pasted one hyperlink into a multiple cell range rather than defining each one separately. When you copy a cell containing a hyperlink and paste into a multiple cell range, Excel seems to treat all the hyperlinks in the pasted range as hyperlinks referring to the entire multiple cell range. The Target hyperlink parameter in the event handler must always be a singe cell range for this to work. So you need to create hyperlinks in each cell separately. Tedious but necessary. You could make the cell contents for these hyperlinks anything AS LONG AS each cell's contents is distinct from that of all the other cells. Then you could use a lookup table with these hyperlink labels in the first column and the actual hyperlink addresses/references in the second column, name the table RunTBL, and change the event handler to Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) With Me.Parent.Names If Not Intersect(Target.Range, _ .Item("RunEXE").RefersToRange) Is Nothing Then _ Shell Application.WorksheetFunction.VLookup( _ Target.Range.Text, .Item("RunTBL").RefersToRange, 2), _ vbNormalFocus End With End Sub |
How Do You Stop Annoying Excel Message Boxes?
Hi Thanks again for your help. It's certainly more complicated than I thought it might be. As I understand it now , this is the routine : 1. I'll need to attribute Names to individual cells in the region I want to use. So for example , I might Name A1 to 'CellA1' and A2 to 'CellA2' 2. Then I set up individual hyperlinks within each cell , setting the 'place in this cell' value to the Name of the cell that the hyperlink is in. 3, Then in the sheet tab I place this code : Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) With Me.Parent.Names("CellA1") If Not Intersect(Target.Range, .RefersToRange) Is Nothing Then _ Shell Target.Range.Text, vbNormalFocus End With With Me.Parent.Names("CellA2") If Not Intersect(Target.Range, .RefersToRange) Is Nothing Then _ Shell Target.Range.Text, vbNormalFocus End With End Sub ....And then when any of the hyperlinks is clicked , it will open the target application with no warning pop up. Do I have this correct now? Thanks. ^_^ In article , Harlan Grove writes Colin Hayes wrote... Harlan Grove writes ... Define RunEXE as Sheet1!A3:A6 and enter the following into A3:A6. winver calc notepad mspaint Enter foobar into Sheet1!A7. Make each of these a hyperlink pointing to its own cell. Then use the event handler in Sheet1's class module. Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) With Me.Parent.Names("RunEXE") If Not Intersect(Target.Range, .RefersToRange) Is Nothing Then _ Shell Target.Range.Text, vbNormalFocus End With End Sub ... This was supposed to have set up a range, RunEXE, within which hyperlinks would run external programs based on the cell contents (hyperlink label) of the cells containing the hyperlinks. I included foobar as a hyperlink outside the RunEXE range as a hyperlink that would NOT run via the event handler. . . . I'm not sure . . . what you meant by have each point to their own cell. . . . ... I mean cell A3 initially contains the text 'winver' (without quotes), you move to cell A3, run Insert Hyperlink, link to a Place in This Document and set the cell reference to A3. So the hyperlink refers to the cell containing it. Similarly for cells A4:A7. I used 'points to' instead of 'refers to'. My bad. It's very interesting , but gave mixed results I found. One of the hyperlinks worked perfectly with no popup (!), but another in the Named area gave a VBA run-time error 'file not found'. This line was highlighted in the debugger : Shell Target.Range.Text, vbNormalFocus ... . . . Again , it ran the first hyperlink successfully , but gave the above run-time error for each after. It also selected and highlighted in blue the RunEXE area. Which would indicate that you copied and pasted one hyperlink into a multiple cell range rather than defining each one separately. When you copy a cell containing a hyperlink and paste into a multiple cell range, Excel seems to treat all the hyperlinks in the pasted range as hyperlinks referring to the entire multiple cell range. The Target hyperlink parameter in the event handler must always be a singe cell range for this to work. So you need to create hyperlinks in each cell separately. Tedious but necessary. You could make the cell contents for these hyperlinks anything AS LONG AS each cell's contents is distinct from that of all the other cells. Then you could use a lookup table with these hyperlink labels in the first column and the actual hyperlink addresses/references in the second column, name the table RunTBL, and change the event handler to Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) With Me.Parent.Names If Not Intersect(Target.Range, _ .Item("RunEXE").RefersToRange) Is Nothing Then _ Shell Application.WorksheetFunction.VLookup( _ Target.Range.Text, .Item("RunTBL").RefersToRange, 2), _ vbNormalFocus End With End Sub |
How Do You Stop Annoying Excel Message Boxes?
Colin Hayes wrote...
.... As I understand it now , this is the routine : 1. I'll need to attribute Names to individual cells in the region I want to use. So for example , I might Name A1 to 'CellA1' and A2 to 'CellA2' Not exactly. Each cell containing a hyperlink should display something different than any of the other cells. NONE of the cells that would contain hyperlinks need to have defined names referring to them. You only need to define a name for (ideally) the smallest range containing the cells with hyperlinks you want to process through the FollowHyperlink event handler. Repeat: NONE of the individual cells containing hyperlinks NEEDS to be named, i.e., given a defined name. 2. Then I set up individual hyperlinks within each cell , setting the 'place in this cell' value to the Name of the cell that the hyperlink is in. 'Place in This DOCUMENT'? I suppose you could do this, but all you need to do is enter each cell's own cell addresses as their cell reference. 3, Then in the sheet tab I place this code : .... Your code might work, but it's unreasonably repetitive and fragile. I already provided a working setup - tested on my own system. If you haven't tried it, consider doing so. If you don't like it, perhaps someone else could provide you with something you'd like better. |
How Do You Stop Annoying Excel Message Boxes?
Hi OK Thanks for your help and patience. I do read everything you write and do my best to implement it correctly , I promise. I did run your suggested setup and it gave a runtime error on my machine. I just set it up fresh and it gave the same error. This is what I did : 1. I highlighted and defined A1:E8 as RunEXE 2. I pasted your routine into the sheet 1 code tab : Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) With Me.Parent.Names("RunEXE") If Not Intersect(Target.Range, .RefersToRange) Is Nothing Then _ Shell Target.Range.Text, vbNormalFocus End With End Sub 3. I put a hyperlink address into A1 , and made sure the cell reference in 'Place in the document is A1. Save and reopen. Tested it - worked with no popup. Perfect. 4 I put a hyperlink address into A3 , within the RunEXE area , and made sure the cell reference in 'Place in this document' is A3. Save and reopen. Tested it - gave run time error pointing to this line in the debugger : Shell Target.Range.Text, vbNormalFocus 5. I put a hyperlink address into A5 , within the RunEXE area , and made sure the cell reference in 'Place in this document' is A5. Save and reopen. Tested it - gave run time error pointing to this line in the debugger : Shell Target.Range.Text, vbNormalFocus In summary , it seems that the first hyperlink in the RunEXE area works fine , but subsequent links in the same area give the error. If you can advise on this , I'd be grateful. I'm sure you will wish to abandon me with exasperation now , but I'm working hard to interpret your advice given the limits of my expertise , I promise. Thanks again. In article , Harlan Grove writes Colin Hayes wrote... ... As I understand it now , this is the routine : 1. I'll need to attribute Names to individual cells in the region I want to use. So for example , I might Name A1 to 'CellA1' and A2 to 'CellA2' Not exactly. Each cell containing a hyperlink should display something different than any of the other cells. NONE of the cells that would contain hyperlinks need to have defined names referring to them. You only need to define a name for (ideally) the smallest range containing the cells with hyperlinks you want to process through the FollowHyperlink event handler. Repeat: NONE of the individual cells containing hyperlinks NEEDS to be named, i.e., given a defined name. 2. Then I set up individual hyperlinks within each cell , setting the 'place in this cell' value to the Name of the cell that the hyperlink is in. 'Place in This DOCUMENT'? I suppose you could do this, but all you need to do is enter each cell's own cell addresses as their cell reference. 3, Then in the sheet tab I place this code : ... Your code might work, but it's unreasonably repetitive and fragile. I already provided a working setup - tested on my own system. If you haven't tried it, consider doing so. If you don't like it, perhaps someone else could provide you with something you'd like better. |
How Do You Stop Annoying Excel Message Boxes?
Colin Hayes wrote...
.... 4 I put a hyperlink address into A3 , within the RunEXE area , and made sure the cell reference in 'Place in this document' is A3. Save and reopen. Tested it - gave run time error pointing to this line in the debugger : Shell Target.Range.Text, vbNormalFocus This indicates that the cell doesn't evaluate to something Shell can launch as a program. I didn't test this thoroughly. While Windows's own Run dialog can run urls directly, it appears VBA's Shell statement can't. To accommodate the Shell statement's limitations, change the event handler to Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) Dim cmd As String cmd = Environ("COMSPEC") & " /c start " With Me.Parent.Names("RunRng") If Not Intersect(Target.Range, .RefersToRange) Is Nothing Then _ Shell cmd & Target.Range.Text, vbHide End With End Sub For urls to .EXE files, this will display a dialog asking if you want to run or save the file, which puts you back in the same place you started at, though with a different dialog. I didn't test for that before now either. You could use the freely available utility wget to download .EXE files pointed to by urls into the TEMP directory, run the downloaded .EXE files, then delete them. Messy, but it works. |
How Do You Stop Annoying Excel Message Boxes?
Hi Harlan OK I ran the new code. Thanks for your expertise with this. The three links on my sheet within the Named RunEXE area are just links to programs on the C drive - none to URLs on the net. For the 'text to display' for each link in turn I've put 'Access' , 'Word' and Front Page'. These are in A1 , A3 and A5 respectively. With the code in place , I click on 'Access' in A1 and it runs the link with no popup - perfect. I click on 'Word' in A2 , and it gives the error 'Windows cannot find 'Word'. Make sure you typed the name correctly and then try again. To search for a file , click the Start button , and the click search' I click Front Page , it gives the same error , saying 'Windows cannot Find 'Front' .......... This is very interesting. It's clearly recognizing the RunEXE area , and happily running the one link for Access , but not the other two. I did move the hyperlinks around , and moved Word to A1 , and it gave the same error. It's only Access which consistently runs correctly , irrespective of its position on the sheet. Very curious. I hope this helps. I do think it's close. Would it be of use if I sent my small file on to you? Best Wishes Colin In article , Harlan Grove writes Colin Hayes wrote... ... 4 I put a hyperlink address into A3 , within the RunEXE area , and made sure the cell reference in 'Place in this document' is A3. Save and reopen. Tested it - gave run time error pointing to this line in the debugger : Shell Target.Range.Text, vbNormalFocus This indicates that the cell doesn't evaluate to something Shell can launch as a program. I didn't test this thoroughly. While Windows's own Run dialog can run urls directly, it appears VBA's Shell statement can't. To accommodate the Shell statement's limitations, change the event handler to Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) Dim cmd As String cmd = Environ("COMSPEC") & " /c start " With Me.Parent.Names("RunRng") If Not Intersect(Target.Range, .RefersToRange) Is Nothing Then _ Shell cmd & Target.Range.Text, vbHide End With End Sub For urls to .EXE files, this will display a dialog asking if you want to run or save the file, which puts you back in the same place you started at, though with a different dialog. I didn't test for that before now either. You could use the freely available utility wget to download .EXE files pointed to by urls into the TEMP directory, run the downloaded .EXE files, then delete them. Messy, but it works. |
How Do You Stop Annoying Excel Message Boxes?
Colin Hayes wrote...
.... With the code in place , I click on 'Access' in A1 and it runs the link with no popup - perfect. I click on 'Word' in A2 , and it gives the error 'Windows cannot find 'Word'. Make sure you typed the name correctly and then try again. To search for a file , click the Start button , and the click search' I click Front Page , it gives the same error , saying 'Windows cannot Find 'Front' .......... .... To run any local program without preceding the program's filename with its full drive/directory path the program must either be in a directory that's included in the PATH environment variable or is included as a subkey of either of the following registry keys. HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths Anything else, and Excel/VBA will complain it can't find the file. Furthermore, programs with spaces in their filenames must be enclosed in double quotes, and once you do so you'll need to provide the optional title parameter to the start command. Since the Access .EXE file is named MSACCESS.EXE, I suspect you have a batch file or script file with base filename ACCESS somewhere in your PATH. That's fine, but it'd be more robust to launch Access with its actual filename, MSACCESS. For the heck of it create a table somewhere else named RunTBL with the following records. Access MSACCESS Word WINWORD Front Page "Front Page" And change the FollowHyperlink event handler code to Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) If Not Intersect(Target.Range, _ Evaluate("RunEXE")) Is Nothing Then _ Shell Environ("COMSPEC") & " /c start """" " & _ Application.WorksheetFunction.VLookup(Target.Range .Text, _ Evaluate("RunTBL"), 2, 0), vbHide End Sub |
How Do You Stop Annoying Excel Message Boxes?
Hi Harlan OK I changed the three names in my sample file to be those of the actual file , and all ran perfectly with no popups! I tried this out first before trying the table idea , using your previous code. Good stuff! :) Next , I tried to apply this to the actual worksheet in the actual workbook that I want it to run in , and encountered some problems. :( I'm sure I'm doing exactly as in my trial file , but this time , the links when run get stuck on the black cmd screen and go no further. I can't imagine why this should be. This is on wksht 2 , and I'm putting the code under the tab. I'm sure I've set it up exactly the same. I was so encouraged after success in my trial set up. Is there any configuration of an excel worksheet which would interfere with the operation of the code? I assume this too this will only work with .exe files. I did try to use it with a .chm file , which should be equally executable I would have thought , but found it objected (It gives the 'Windows cannot find ... ' warning) Best Wishes Colin In article , Harlan Grove writes Colin Hayes wrote... ... With the code in place , I click on 'Access' in A1 and it runs the link with no popup - perfect. I click on 'Word' in A2 , and it gives the error 'Windows cannot find 'Word'. Make sure you typed the name correctly and then try again. To search for a file , click the Start button , and the click search' I click Front Page , it gives the same error , saying 'Windows cannot Find 'Front' .......... ... To run any local program without preceding the program's filename with its full drive/directory path the program must either be in a directory that's included in the PATH environment variable or is included as a subkey of either of the following registry keys. HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Ap p Paths HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Ap p Paths Anything else, and Excel/VBA will complain it can't find the file. Furthermore, programs with spaces in their filenames must be enclosed in double quotes, and once you do so you'll need to provide the optional title parameter to the start command. Since the Access .EXE file is named MSACCESS.EXE, I suspect you have a batch file or script file with base filename ACCESS somewhere in your PATH. That's fine, but it'd be more robust to launch Access with its actual filename, MSACCESS. For the heck of it create a table somewhere else named RunTBL with the following records. Access MSACCESS Word WINWORD Front Page "Front Page" And change the FollowHyperlink event handler code to Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) If Not Intersect(Target.Range, _ Evaluate("RunEXE")) Is Nothing Then _ Shell Environ("COMSPEC") & " /c start """" " & _ Application.WorksheetFunction.VLookup(Target.Range .Text, _ Evaluate("RunTBL"), 2, 0), vbHide End Sub |
How Do You Stop Annoying Excel Message Boxes?
Colin Hayes wrote...
.... Next , I tried to apply this to the actual worksheet in the actual workbook that I want it to run in , and encountered some problems. .... I'm sure I'm doing exactly as in my trial file , but this time , the links when run get stuck on the black cmd screen and go no further. .... Different workbooks, but are you running both on the same computer? Is this other workbook opened from a network location or also from a local drive? Does anything appear in the console window? Actually, the Shell statement shouldn't be displaying console windows since its 2nd argument is vbHide. If you're seeing console windows when you're trying to run GUI executables, something is going wrong in the start command that Shell is running. So what are the command names in the second workbook? If one of these commands were foo bar (just a placeholder - replace it with your actual command), what happens when you open the Run dialog (hold down the Windows logo key, usually just to the left of the left [Alt] key, and press the R key) and enter the command %COMSPEC% /c start "" "foo bar" Again: replace "foo bar" with your actual commands. I assume this too this will only work with .exe files. I did try to use it with a .chm file , which should be equally executable I would have thought , but found it objected (It gives the 'Windows cannot find ... ' warning) Works for me using command lines like the one above. |
How Do You Stop Annoying Excel Message Boxes?
Hi Harlan Interesting this : I tried it all out as you suggested , I'll give in line results : Different workbooks, but are you running both on the same computer? Yes , same machine. Is this other workbook opened from a network location or also from a local drive? On the same local drive. Does anything appear in the console window? Yes after each is run - C\msoffice\excel_ Cursor is blinking. Actually, the Shell statement shouldn't be displaying console windows since its 2nd argument is vbHide. If you're seeing console windows when you're trying to run GUI executables, something is going wrong in the start command that Shell is running. So what are the command names in the second workbook? I'm running them from the hyperlink , so with the code in place the command must be %COMSPEC% /c start "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" If one of these commands were foo bar (just a placeholder - replace it with your actual command), what happens when you open the Run dialog (hold down the Windows logo key, usually just to the left of the left [Alt] key, and press the R key) and enter the command %COMSPEC% /c start "" "foo bar" Again: replace "foo bar" with your actual commands. I entered this command via run : %COMSPEC% /c start "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" This gives the black cmd box with C:\windows\system32_ cursor is flashing I assume this too this will only work with .exe files. I did try to use it with a .chm file , which should be equally executable I would have thought , but found it objected (It gives the 'Windows cannot find ... ' warning) Works for me using command lines like the one above. Very strange - all the hyperlinks in my second workbook give this cmd window result , whereas all the hyperlinks in my first trial workbook connect successfully.. I must be overlooking something. Hopefully the above will give some clue. I'd be happy to email both books on to you if you'd like to see them first hand, They're both v small. Best Wishes Colin |
How Do You Stop Annoying Excel Message Boxes?
Harlan As an extra to that below , when I run the command "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" form the run box , the program opens immediately and correctly. Same with the other examples of Winword and Frontpg. With the addition of %COMSPEC% /c start to the start of the command , the cmd box results. Colin In article , Colin Hayes writes Hi Harlan Interesting this : I tried it all out as you suggested , I'll give in line results : Different workbooks, but are you running both on the same computer? Yes , same machine. Is this other workbook opened from a network location or also from a local drive? On the same local drive. Does anything appear in the console window? Yes after each is run - C\msoffice\excel_ Cursor is blinking. Actually, the Shell statement shouldn't be displaying console windows since its 2nd argument is vbHide. If you're seeing console windows when you're trying to run GUI executables, something is going wrong in the start command that Shell is running. So what are the command names in the second workbook? I'm running them from the hyperlink , so with the code in place the command must be %COMSPEC% /c start "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" If one of these commands were foo bar (just a placeholder - replace it with your actual command), what happens when you open the Run dialog (hold down the Windows logo key, usually just to the left of the left [Alt] key, and press the R key) and enter the command %COMSPEC% /c start "" "foo bar" Again: replace "foo bar" with your actual commands. I entered this command via run : %COMSPEC% /c start "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" This gives the black cmd box with C:\windows\system32_ cursor is flashing I assume this too this will only work with .exe files. I did try to use it with a .chm file , which should be equally executable I would have thought , but found it objected (It gives the 'Windows cannot find ... ' warning) Works for me using command lines like the one above. Very strange - all the hyperlinks in my second workbook give this cmd window result , whereas all the hyperlinks in my first trial workbook connect successfully.. I must be overlooking something. Hopefully the above will give some clue. I'd be happy to email both books on to you if you'd like to see them first hand, They're both v small. Best Wishes Colin |
How Do You Stop Annoying Excel Message Boxes?
Colin Hayes wrote...
.... . . . enter the command %COMSPEC% /c start "" "foo bar" Again: replace "foo bar" with your actual commands. I entered this command via run : %COMSPEC% /c start "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" This gives the black cmd box with C:\windows\system32_ You need to follow my instructions EXACTLY! And you need to stop guessing that there may be typos in my instructions. If something I've included doesn't make sense to you, you should ask about it. The "" before "foo bar" in my sample command line WASN'T optional. Try the following EXACT command line. %COMSPEC% /c start "" "C:\Program Files\Microsoft Office \OFFICE11\MSACCESS.EXE" The start command treats the "" as it's window title argument, and it's NECESSARY when you need to put quotes around the command name because it has embedded spaces. |
How Do You Stop Annoying Excel Message Boxes?
This gives the black cmd box with C:\windows\system32_ You need to follow my instructions EXACTLY! And you need to stop guessing that there may be typos in my instructions. If something I've included doesn't make sense to you, you should ask about it. The "" before "foo bar" in my sample command line WASN'T optional. Try the following EXACT command line. %COMSPEC% /c start "" "C:\Program Files\Microsoft Office \OFFICE11\MSACCESS.EXE" The start command treats the "" as it's window title argument, and it's NECESSARY when you need to put quotes around the command name because it has embedded spaces. Hi Harlan Thanks - I do see what you're saying , and do always try to paste directly so as not to make typos. However it's this code , rather than the one you highlight above , which gives the error of the hanging cmd screen : Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) Dim cmd As String cmd = Environ("COMSPEC") & " /c start " With Me.Parent.Names("RunEXE") If Not Intersect(Target.Range, .RefersToRange) Is Nothing Then _ Shell cmd & Target.Range.Text, vbHide End With End Sub Any idea what might be causing this? Best Wishes Colin |
How Do You Stop Annoying Excel Message Boxes?
Colin Hayes wrote...
.... . . . However it's this code , rather than the one you highlight above , which gives the error of the hanging cmd screen : Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) Dim cmd As String cmd = Environ("COMSPEC") & " /c start " With Me.Parent.Names("RunEXE") If Not Intersect(Target.Range, .RefersToRange) Is Nothing Then _ Shell cmd & Target.Range.Text, vbHide End With End Sub Any idea what might be causing this? Yes. You're not implementing all the changes I've been throwing at you. If you're not going to implement a table mapping cell contents from hyperlinks in the RunEXE range into command names, and you're not going to include double quotes in the cell contents for the hyperlinks in RunEXE, then you'll need to put those double quotes into the event handler. REPLACE THE CODE ABOVE WITH THE FOLLOWING **EXACT** CODE. Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) Dim cmd As String cmd = Environ("COMSPEC") & " /c start """" " With Me.Parent.Names("RunEXE") If Not Intersect(Target.Range, .RefersToRange) Is Nothing Then _ Shell cmd & """" & Target.Range.Text & """", vbHide End With End Sub |
How Do You Stop Annoying Excel Message Boxes?
In article
, Harlan Grove writes Any idea what might be causing this? Yes. You're not implementing all the changes I've been throwing at you. If you're not going to implement a table mapping cell contents from hyperlinks in the RunEXE range into command names, and you're not going to include double quotes in the cell contents for the hyperlinks in RunEXE, then you'll need to put those double quotes into the event handler. REPLACE THE CODE ABOVE WITH THE FOLLOWING **EXACT** CODE. Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) Dim cmd As String cmd = Environ("COMSPEC") & " /c start """" " With Me.Parent.Names("RunEXE") If Not Intersect(Target.Range, .RefersToRange) Is Nothing Then _ Shell cmd & """" & Target.Range.Text & """", vbHide End With End Sub Hi Harlan OK Thanks. I'm grateful for your perseverance. I pasted the code into a new sheet , set up several hyperlinks and it worked perfectly immediately. Hooray! Except on .chm. I then pasted it into the actual wb I want to use it in , and it opens the program folder that the wb itself is in , displaying the files. (!). Most curious. There must be something in my existing wb that is interfering with the code , that is not present in a completely new sheet. I wonder if something is going awry in the email transport. I'll keep playing with it. I hesitate to prolong this now , as you been so helpful. I don't want to keep trying your patience. Hopefully I can get it going in a reliable and predictable fashion. I'll let you know , of course. Best Wishes Colin |
All times are GMT +1. The time now is 10:44 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com