ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Links and Linking in Excel (https://www.excelbanter.com/links-linking-excel/)
-   -   Random hyperlinks everywhere (https://www.excelbanter.com/links-linking-excel/11017-random-hyperlinks-everywhere.html)

FNORD

Random hyperlinks everywhere
 
Hello -

We're on Excel 2002 SP3 and use Windows XP.

Our database here at my work is HUGE... and incorporates a mixture of names,
addresses...etc... plus EMAIL addresses. These email addresses show as
hyperlinks, which of course causes our default email program to open up and
input that email address in the "to" line so that we can email that
person.... which totally isn't a problem and exactly what we want.

The problem I'm having now though lies upon any row that has an email
address. ...(we have multiple email addresses in our rows along with other
data)... If I click on ANYTHING in that row... even something that ISN'T an
email address, or a hyperlink (i.e. a name, city, or whatever that is
standard text)... it's doing the whole "mailto:" thing and opening up my
email program and inserting a RANDOM email address that was pulled from our
database.

What's even more strange€¦. is that it's only applied to some of the columns
on the right. It appears the first half of our columns aren't affected by
this.

Now I've TRIED the Microsoft help menu to "deactivate several hyperlinks"
and it refers me to go to "paste special" under the edit screen, then click
"OPERATION"?? I don't even seen an option to choose "operation" at this
point. The only screens I see are - source: "unicode text" or "text" and
neither of those options work while selecting multiple cells.

I know I can go through the 10,000+ cells and right click on each and select
"remove hyperlink"... but that just seems silly if there can be a faster way.

Also... I have NO idea how this problem started... it just started doing
this within the past day or so.

Please help! =(

I'll continuously check this and I'll be happy to provide any further
details.


Bill Manville

Select the area which contains unwanted hyperlinks and run this macro:

Sub RemoveHyperlinks()
Selection.Hyperlinks.Delete
End Sub

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup


FNORD

Hello -

Thanks so much for the response. Unfortunately this problem seems to lie
deeper. I just ran the macro and it's still happenening. If I run the macro
on the column with the actual email addresses, it WILL take out the
hyperlink... therefore I know the macro itself is working. However...when I
try to run the macro with the plain text that NEVER should have been linked
to random email addresses, it's still happening and the macro doesn't affect
it at all.

"Bill Manville" wrote:

Select the area which contains unwanted hyperlinks and run this macro:

Sub RemoveHyperlinks()
Selection.Hyperlinks.Delete
End Sub

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup



FNORD

Oh and another thing.... If I simply right click on a cell and click on
"remove hyperlink" on the plain text that I'm having problems with.... it
will hyperlink all the data in the row to the right of it??? The plain text
data with names, addresses, etc.... will all turn into hyperlinks to the
random email address it's decided to link up that I removed. It will also
format all the data to the right of the cell, when previously it was
formatted to the left. I've never seen anything like this.

"FNORD" wrote:

Hello -

Thanks so much for the response. Unfortunately this problem seems to lie
deeper. I just ran the macro and it's still happenening. If I run the macro
on the column with the actual email addresses, it WILL take out the
hyperlink... therefore I know the macro itself is working. However...when I
try to run the macro with the plain text that NEVER should have been linked
to random email addresses, it's still happening and the macro doesn't affect
it at all.

"Bill Manville" wrote:

Select the area which contains unwanted hyperlinks and run this macro:

Sub RemoveHyperlinks()
Selection.Hyperlinks.Delete
End Sub

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup



FNORD

Ok I just applied the macro to the whole spreadsheet and it fixed the
problem... sorta. Obviously now my emails aren't linked.... and when I went
to format the column with the email addresses as a hyperlink.. they still
won't link because the macro is applied still. How do I undo the macro for
that column alone? I'm not too familiar with macros.

Thanks again!

"FNORD" wrote:

Oh and another thing.... If I simply right click on a cell and click on
"remove hyperlink" on the plain text that I'm having problems with.... it
will hyperlink all the data in the row to the right of it??? The plain text
data with names, addresses, etc.... will all turn into hyperlinks to the
random email address it's decided to link up that I removed. It will also
format all the data to the right of the cell, when previously it was
formatted to the left. I've never seen anything like this.

"FNORD" wrote:

Hello -

Thanks so much for the response. Unfortunately this problem seems to lie
deeper. I just ran the macro and it's still happenening. If I run the macro
on the column with the actual email addresses, it WILL take out the
hyperlink... therefore I know the macro itself is working. However...when I
try to run the macro with the plain text that NEVER should have been linked
to random email addresses, it's still happening and the macro doesn't affect
it at all.

"Bill Manville" wrote:

Select the area which contains unwanted hyperlinks and run this macro:

Sub RemoveHyperlinks()
Selection.Hyperlinks.Delete
End Sub

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup



Bill Manville

Once you have removed the hyperlinks they have gone.

You would need a different macro to create mailto: hyperlinks from the
content of selected cells. Something like this

Sub MakeMailLinks()
Dim C As Range
For Each C In Selection.Cells
If C.Hyperlinks.Count = 0 And C.HasFormula = False And
InStr(C.Value, "@") 0 Then
C.Hyperlinks.Add C, "MailTo:" & C.Value
End If
Next
End Sub


Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup


Bill Manville

The behaviour you describe is bizarre.
Are you sure that there is no malicious or malfunctioning macro
responsible for it?
If you open the workbook with macros disabled does the behaviour
persist?
If so, if you open Excel with the shift key held down and then open the
workbook with macros disabled does the behaviour persist?



Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup


FNORD

Thank you so much for your help. I'm almost off work, so I'll test that
macro tomorrow, although I'm not too worried if I can't get those to
hyperlink again.

I'm the only person in the office that has access to make changes to our
database (everyone else is "read-only"). About 3 or 4 months ago, I started
getting a display about how macro's were disabled when I first open my
database. Now, this is most likely caused by our IS Dept. setting the macro
security to high (because that's what it was set to today and has been for
the past few months apparently.... because I had to change the settings to
low so that I could create the macro). Therefore, if the macros were
disabled, I don't think it was a malicious macro affecting our database.
Honestly it was fine one moment, then all of a sudden it started going crazy
hyperlinking on me. Now when I say hyperlink... I don't mean it was a
regular blue hyperlink... it looked like the regular text it should be, but
when you held your cursor over it.. it would have the "mailto: "
thing and when you click on the cell it would open the email program. The
email address wouldn't even be from that row... but a completely random email
address elsewhere in the database. When I would right click on the cell and
click "remove hyperlink" it would remove it in that cell alone and then turn
everything in the cells to the right of it a BLUE normal hyperlink and mess
the formatting up. I asked our IS department and they haven't even touched
my database. Weird huh!

I really appreciate all of your help with this.

"FNORD" wrote:

Hello -

We're on Excel 2002 SP3 and use Windows XP.

Our database here at my work is HUGE... and incorporates a mixture of names,
addresses...etc... plus EMAIL addresses. These email addresses show as
hyperlinks, which of course causes our default email program to open up and
input that email address in the "to" line so that we can email that
person.... which totally isn't a problem and exactly what we want.

The problem I'm having now though lies upon any row that has an email
address. ...(we have multiple email addresses in our rows along with other
data)... If I click on ANYTHING in that row... even something that ISN'T an
email address, or a hyperlink (i.e. a name, city, or whatever that is
standard text)... it's doing the whole "mailto:" thing and opening up my
email program and inserting a RANDOM email address that was pulled from our
database.

What's even more strange€¦. is that it's only applied to some of the columns
on the right. It appears the first half of our columns aren't affected by
this.

Now I've TRIED the Microsoft help menu to "deactivate several hyperlinks"
and it refers me to go to "paste special" under the edit screen, then click
"OPERATION"?? I don't even seen an option to choose "operation" at this
point. The only screens I see are - source: "unicode text" or "text" and
neither of those options work while selecting multiple cells.

I know I can go through the 10,000+ cells and right click on each and select
"remove hyperlink"... but that just seems silly if there can be a faster way.

Also... I have NO idea how this problem started... it just started doing
this within the past day or so.

Please help! =(

I'll continuously check this and I'll be happy to provide any further
details.


Bill Manville

The fact that macro security was set to high would not prevent code
from workbooks that were loaded at startup (e.g. addins and files in
XLSTART) from running. Hence my suggestion of opening Excel with the
shift key held down to see if the behaviour went away and could
therefore be attributed to some malicious code.

If you have further trouble with the sheet I think I would remake it
(by copying the data and paste special / values to a new workbook, then
using the second macro to set the mailto hyperlinks that you really
want.

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup



All times are GMT +1. The time now is 09:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com