Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
xl2k
Excel insists on treating a share name (\\directoryname) in a cell as a hyperlink. I use them extensively on templates to point my VBA routines to the directories to be used. Each time I enter it in a cell I have to turn around and Remove the link. I've looked at Tools-Options, thinking that there must be a switch I could throw, but to no avail. Not a big deal as I could skip the double backslash and add it in the macro, but I'd rather have the whole name in the cell to prevent confusion for the users. -- Regards; Rob ------------------------------------------------------------------------ |
#2
![]() |
|||
|
|||
![]()
If you prefix the value with an apostrophe, does that stop it?
'\\myshare\myfolder\myfile.xls You can remove the hyperlinks from a selected area by running a small macro: option Explicit sub removeLinks() selection.hyperlinks.delete end sub If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm RWN wrote: xl2k Excel insists on treating a share name (\\directoryname) in a cell as a hyperlink. I use them extensively on templates to point my VBA routines to the directories to be used. Each time I enter it in a cell I have to turn around and Remove the link. I've looked at Tools-Options, thinking that there must be a switch I could throw, but to no avail. Not a big deal as I could skip the double backslash and add it in the macro, but I'd rather have the whole name in the cell to prevent confusion for the users. -- Regards; Rob ------------------------------------------------------------------------ -- Dave Peterson |
#3
![]() |
|||
|
|||
![]()
I'm not new at macro's although-at times-it seems that everything I know is wrong!
Yes, forcing the entry to text (apostrophe) does work, but *only* if I enter the ' initially. If I enter the UNC without the ' it treats it as a link if I then edit the field and add the ' it still stays as a link. If I enter it with the ' - all is well (as noted). If I then delete the ' it becomes a link and if I try re-entering the value with the ', it stays as a link. Tried formatting the cell as text - same thing, entry becomes a link. In other words, once a link, always a link. This is not a major problem, more of an annoyance-if I forget the ' and go back to the cell-with the mouse-to remove the link it immediately tries to connect to the link. I was hoping there would be some setting to disable the links at the user's option. Oh well, thanks for the response. -- Regards; Rob ------------------------------------------------------------------------ "Dave Peterson" wrote in message ... If you prefix the value with an apostrophe, does that stop it? '\\myshare\myfolder\myfile.xls You can remove the hyperlinks from a selected area by running a small macro: option Explicit sub removeLinks() selection.hyperlinks.delete end sub If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm RWN wrote: xl2k Excel insists on treating a share name (\\directoryname) in a cell as a hyperlink. I use them extensively on templates to point my VBA routines to the directories to be used. Each time I enter it in a cell I have to turn around and Remove the link. I've looked at Tools-Options, thinking that there must be a switch I could throw, but to no avail. Not a big deal as I could skip the double backslash and add it in the macro, but I'd rather have the whole name in the cell to prevent confusion for the users. -- Regards; Rob ------------------------------------------------------------------------ -- Dave Peterson |
#4
![]() |
|||
|
|||
![]()
Select the range of cells that no longer need to have hyperlinks.
Hit alt-f11 (to get to the VBE) hit ctrl-g (to see the immediate window) type this (or copy|paste) into that window: selection.hyperlinks.delete (hit enter) Close the VBE and back to excel. The macro might be something nice to add to a workbook (like Personal.xl*) so that it's always available, but it's not necessary. RWN wrote: I'm not new at macro's although-at times-it seems that everything I know is wrong! Yes, forcing the entry to text (apostrophe) does work, but *only* if I enter the ' initially. If I enter the UNC without the ' it treats it as a link if I then edit the field and add the ' it still stays as a link. If I enter it with the ' - all is well (as noted). If I then delete the ' it becomes a link and if I try re-entering the value with the ', it stays as a link. Tried formatting the cell as text - same thing, entry becomes a link. In other words, once a link, always a link. This is not a major problem, more of an annoyance-if I forget the ' and go back to the cell-with the mouse-to remove the link it immediately tries to connect to the link. I was hoping there would be some setting to disable the links at the user's option. Oh well, thanks for the response. -- Regards; Rob ------------------------------------------------------------------------ "Dave Peterson" wrote in message ... If you prefix the value with an apostrophe, does that stop it? '\\myshare\myfolder\myfile.xls You can remove the hyperlinks from a selected area by running a small macro: option Explicit sub removeLinks() selection.hyperlinks.delete end sub If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm RWN wrote: xl2k Excel insists on treating a share name (\\directoryname) in a cell as a hyperlink. I use them extensively on templates to point my VBA routines to the directories to be used. Each time I enter it in a cell I have to turn around and Remove the link. I've looked at Tools-Options, thinking that there must be a switch I could throw, but to no avail. Not a big deal as I could skip the double backslash and add it in the macro, but I'd rather have the whole name in the cell to prevent confusion for the users. -- Regards; Rob ------------------------------------------------------------------------ -- Dave Peterson -- Dave Peterson |
#5
![]() |
|||
|
|||
![]()
Thanks Dave.
Already came to that conclusion - for me it's a "MSWish" item, but I'm probably the only one so I'll add it to my utilities workbook. -- Regards; Rob ------------------------------------------------------------------------ "Dave Peterson" wrote in message ... Select the range of cells that no longer need to have hyperlinks. Hit alt-f11 (to get to the VBE) hit ctrl-g (to see the immediate window) type this (or copy|paste) into that window: selection.hyperlinks.delete (hit enter) Close the VBE and back to excel. The macro might be something nice to add to a workbook (like Personal.xl*) so that it's always available, but it's not necessary. RWN wrote: I'm not new at macro's although-at times-it seems that everything I know is wrong! Yes, forcing the entry to text (apostrophe) does work, but *only* if I enter the ' initially. If I enter the UNC without the ' it treats it as a link if I then edit the field and add the ' it still stays as a link. If I enter it with the ' - all is well (as noted). If I then delete the ' it becomes a link and if I try re-entering the value with the ', it stays as a link. Tried formatting the cell as text - same thing, entry becomes a link. In other words, once a link, always a link. This is not a major problem, more of an annoyance-if I forget the ' and go back to the cell-with the mouse-to remove the link it immediately tries to connect to the link. I was hoping there would be some setting to disable the links at the user's option. Oh well, thanks for the response. -- Regards; Rob ------------------------------------------------------------------------ "Dave Peterson" wrote in message ... If you prefix the value with an apostrophe, does that stop it? '\\myshare\myfolder\myfile.xls You can remove the hyperlinks from a selected area by running a small macro: option Explicit sub removeLinks() selection.hyperlinks.delete end sub If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm RWN wrote: xl2k Excel insists on treating a share name (\\directoryname) in a cell as a hyperlink. I use them extensively on templates to point my VBA routines to the directories to be used. Each time I enter it in a cell I have to turn around and Remove the link. I've looked at Tools-Options, thinking that there must be a switch I could throw, but to no avail. Not a big deal as I could skip the double backslash and add it in the macro, but I'd rather have the whole name in the cell to prevent confusion for the users. -- Regards; Rob ------------------------------------------------------------------------ -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
saved hyperlinks do not keep the file association, all revert to . | Excel Discussion (Misc queries) | |||
Problems with hyperlinks | Excel Discussion (Misc queries) | |||
Can 2 different hyperlinks be in the same Excel cell? | Excel Worksheet Functions | |||
Removing Multiple Hyperlinks | New Users to Excel | |||
up-date hyperlinks in Excel | Excel Worksheet Functions |