Wednesday, March 27, 2013

Find Out If There Is A Hyperlink In A Cell

'_______________________________________________
'
' Use this VBA macro for Excel to find out
' if there is a hyperlink in a cell
'_______________________________________________
'
Sub FindOutIfThereIsAHyperlinkInACell()

'Replace myRow and myColumn below with your own values

If Cells(myRow, myColumn).Hyperlinks.Count > 0 Then MsgBox "Yes there is a hyperlink in this cell"
If Cells(myRow, myColumn).Hyperlinks.Count = 0 Then MsgBox "No there is no hyperlink in this cell"

End Sub

No comments:

Post a Comment

You may comment or show me other VBA tricks, but don't rest assured I'll always reply because I only have 24 hours in a day's hard work, and only a few minutes a week to update this blog... I'll try my best though...