Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default hyperlinktext too long, any remedy?

John,
I have to ask why on earth you need more than 256 chars.
It is supposed to be the "FriendlyName".

NickHK

"John Smith" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default hyperlinktext too long, any remedy?

I have a file full of dictionary entries. Some cells have links to
the dictionary. I managed to delete all the links (probably by
cell.value = string.) Now, I need to recreate the links.

The script I wrote works for short hyperlinktext such as

"to praise highly : GLORIFY"
"over again : ANEW"

but for long text like the following, it won't work.

"2 a : to remove utterly from recognition or memory b : to remove
from existence : destroy utterly all trace, indication, or
significance of c : to cause to disappear (as a bodily part or a
scar) or collapse (as a duct conveying body fluid) : REMOVE 4 <a
blood vessel obliterated by inflammation"

I have solved the problem. The following command is what I was
looking for.

activesheet.hyperlink.add



NickHK wrote:
John,
I have to ask why on earth you need more than 256 chars.
It is supposed to be the "FriendlyName".

NickHK

"John Smith" wrote in message
...

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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
http://CannotDeleteFile.net - Cannot Delete File? Try Long Path ToolFilename is too long? Computer Complaining Your Filename Is Too Long? TheLong Path Tool Can Help While most people can go about their businessblissfully unaware of the Windo Max Loger Excel Discussion (Misc queries) 0 June 14th 11 04:30 PM
Long Long Long Nested If Function sed Excel Discussion (Misc queries) 4 December 9th 09 06:44 PM
Interrupting long calculations in Excel? Hi all, I am having a verylong calculation in Excel using VBA. Of course I know I can hit ESC orCTRL+BREAK to interrupt the VBA program. But I found due to too long runningprocess, the Excel window stop to LunaMoon Excel Discussion (Misc queries) 3 July 31st 08 04:47 PM
Clearing cells takes long, long time unclemuffin Excel Discussion (Misc queries) 9 August 17th 07 02:22 AM
Excel landscape double sided, one side upside down - remedy? Vicky Setting up and Configuration of Excel 1 June 10th 06 02:16 AM


All times are GMT +1. The time now is 11:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"