Archive of Mr Excel Message Board

Back to Printing in Excel archive index
Back to archive home

Excel 2000 Hyperlinks
Posted by Thomas McCabe on March 01, 2001 9:57 AM
Does anyone know if there is a way to not print cells
containing hyperlinks when printing a worksheet? Is there a way to do it using a macro?
Thanks

Re: Excel 2000 Hyperlinks
Posted by cpod on March 01, 2001 11:12 AM
You could make them invisible:
Dim Cell
For Each Cell In Range("a1:i50")
If Cell.Hyperlinks.Count > 0 Then
Cell.Font.Color = Cell.Interior.Color
End If
Next
End Sub
And them bring them back:
Dim Cell
For Each Cell In Range("a1:i50")
If Cell.Hyperlinks.Count > 0 Then
Cell.Font.Color = 16711680
End If
Next
End Sub

Never mind - This would only work on a color printer
Posted by cpod on March 01, 2001 11:19 AM

Re: Never mind - This would only work on a color printer
Posted by Thomas McCabe on March 01, 2001 11:34 AM
It worked cpod. Thank you, that was pure genius!

This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our
online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.