Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() 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 |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() 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 |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#9
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() 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 |
#10
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#11
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#12
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#13
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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. |
#14
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#15
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#16
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#17
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
can I stop the EULA message appearing every time I start Excel? | Excel Discussion (Misc queries) | |||
excel links popup message - very annoying | Excel Discussion (Misc queries) | |||
How to stop message popping up before open the excel? | Excel Discussion (Misc queries) | |||
Can I avoid annoying Update Links message | Excel Discussion (Misc queries) | |||
How do I stop other circles in other boxes to stop selecting? | Excel Worksheet Functions |