How do I print comments and or Hyperlinks setup in cells in Excel.

R

Ray de Laune

we want to be able to print the comments and or hyperlinks, connected to a
particular cell and the data validation information.
 
D

Dave Peterson

For one particular cell?

I'd just copy|paste into notepad and print from there.

Debra Dalgleish/JE McGimpsey have a data|validation documenter available at:

http://www.contextures.com/xlDataVal09.html

And Debra has a way to extract comments an put them into a word document at:
http://www.contextures.com/xlcomments03.html#CopyToWord

And for hyperlinks, you could do something like:

Option Explicit
Sub DataValDocumenter()

Dim myHyperLink As Hyperlink
Dim FileNum As Long

If ActiveSheet.Hyperlinks.Count = 0 Then
MsgBox "No hyperlinks"
Exit Sub
End If

FileNum = FreeFile
Open "hyperlinks.txt" For Output As #FileNum
For Each myHyperLink In ActiveSheet.Hyperlinks
Print #FileNum, myHyperLink.Parent.Address(False, False) & vbTab _
& myHyperLink.Address & vbTab & myHyperLink.SubAddress & vbTab _
& myHyperLink.Parent.Text

Next myHyperLink
Close #FileNum

End Sub

If you're really industrious, you could even combine them into one giant
routine!
 
Top