modification of hyperlink name

@

@lan

Hi,
could you tell me why the following code cause an execution error?

For Each h In Worksheets(nomfeuille).Hyperlinks
If InStr(h.Name, "test1") <> 0 Then
h.Name = Replace(h.Name, "test1", "test2")
End If
Next

thank
 
D

Dick Kusleika

I think the Name property is read only for hyperlinks, although I couldn't
confirm that in help. Try changing the Address property instead.
 
@

@lan

It's ok with Address property
thank you!


Dick said:
*I think the Name property is read only for hyperlinks, although
couldn't
confirm that in help. Try changing the Address property instead.

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com
 
Top