View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
John Smith John Smith is offline
external usenet poster
 
Posts: 62
Default hyperlinktext too long, any remedy?

I'm trying to add hyperlink to cells. The following code works
fine only if the sTemp1 is short. If sTemp1 is long (more than 256
letters or something like that), the code won't work.

Is there a remedy? I can set the cell.value to sTemp1 first. But
then how do I add link to the cell?

================================================== ======
for Each cell In Worksheets("sheet1").Range([b1],
[b65536].End(xlUp)).Cells
..............
..............
If r = 0 Then

cell.Offset(0, 3).Formula = "=HYPERLINK(""" & hyperlinkaddress _
& sTemp & """,""" & sTemp1 & """)"

End If
next