View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bruce Bruce is offline
external usenet poster
 
Posts: 138
Default Hyperlink Address Length Restriction

Thanks, Jake. When I tried adding the links with VBA, I must have been doing
something wrong. It's working for me now. Thanks for your suggestions.
--
Bruce J. Baumann


"Jake Marx" wrote:

Hi Bruce,

In my experience, the UI limits you to about 256 characters for a URL.
However, I was able to add a longer URL via the Hyperlinks.Add method:

Sheet1.Hyperlinks.Add Range("A2"), "<longURLHere"

An alternative would be to use the FollowHyperlink method to launch IE and
follow a hyperlink. Or you could trap the Worksheet_FollowHyperlink event
by setting up the hyperlink to go nowhere (ie, go to the same cell it's in),
look up the URL via a hidden worksheet or similar method, then use the
FollowHyperlink method (or automate IE) to launch the web browser and go to
the desired URL.

--
Regards,

Jake Marx
www.longhead.com


[please keep replies in the newsgroup - email address unmonitored]


Bruce wrote:
I'm trying to add some rather lengthy hyperlinks, and I'm coming
across an apparent length restriction. The URLs I'm trying to add
often include some query-looking stuff that looks like ASP (I'm not
familiar with ASP). For example,
"http://www.someplace.com/AllItems.aspx?RootFolder=%2fblahblahblah...".
It looks like the address gets truncated after 256 characters. I've
tried the HYPERLINK() function, the InsertHyperlink menu item, as
well as adding hyperlinks with VBA, but I get the same result. Am I
missing something, or am I just out of luck?

Is there another way (using VBA perhaps) to maybe feed the url
addresses to some system command, for example, launch IE and provide
the url address?

Thanks for any responses.