How to stop Excel from underlining hyperlinks?

B

baobob

In Excel 2002 10.2614.2625, I have a worksheet in which I never want
to see the contents of any cell underlined, ever.

To implement this, I can press Ctrl-A to hi-lite the sheet, then Ctrl-
U (either once or twice, depending on whether cell I'm sitting on is
already undelined) to kill all underlines thruout the sheet.

Henceforth, Excel behaves very well and doesn't underline new input--
even URLs, which is nice.

BUT, it always undelines newly-inputted hyperlinks. For example, if I
enter =HYPERLINK(<something>) into a cell and press Enter, the thing
is then underlined, and I gotta de-underline it. And I've got hundreds
of the little buggers.

Is there any way to stop Excel from doing that?

Thanks much.

***
 
G

Gary''s Student

Insert the following macro in you worksheet code area:

Private Sub Worksheet_Change(ByVal Target As Range)
Target.Font.Underline = xlUnderlineStyleNone
End Sub

This will prevent underlining from either =HYPERLINK() or Insert >
Hyperlinks...



REMEMBER: the worksheet code area, not a standard module.
 
D

Dave Peterson

You can change the Hyperlink Style, too.

Format|Style|Choose hyperlink in the dropdown box.
Click the Modify button
On the Font tab, change the underline from Single to None.

This style is associated with the workbook. You'll have to do the same thing
for each workbook where you want this behavior.
 
B

baobob

Gary's + Dave:

Thanks so much for replies.

Dave: Are you telling me that I've been using Excel for 20+ years and
NEVER REALLY USED the Style dialog? That is truly sick.

And in fact my next question was going to be how to set font and other
defaults, in general. I was too narrowly focused on Tools / Options
only all these years.

So thanks again. Ya just freed the slaves.

***
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top