Name
range
.Hyperlinks
Synopsis
Returns a Hyperlinks
collection that represents the hyperlinks in the specified range. The following code changes the address of hyperlinks in the specified range that have the address "\\koala\bear"
:
Dim r As Range Dim h As Hyperlink Set r = ActiveSheet.Range("D1:D7") For Each h In r.Hyperlinks If h.Address = "\\koala\bear" Then h.Address = "\\wombat\mojo" End If Next
Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.