Hyperlink longer 256

J

Just Merks

Hi,

There is a limitation within Excel 2007 to have a hyperlink which lengths
exceeds 256. Has anyone a tip to overcome this.
I was considering to use a macro, which would do the jb, but have no idea if
I can assign a macro to a cell. IE by clicking the cell it would run the
macro. As many links are involved it should be a simple way to perform the
job. So not to have the macro be changed for each other case.

Any tips are welcome.

regards

Just
 
S

Stan Brown

There is a limitation within Excel 2007 to have a hyperlink which
lengths exceeds 256. Has anyone a tip to overcome this.
I was considering to use a macro, which would do the jb, but have no idea if
I can assign a macro to a cell. IE by clicking the cell it would run the
macro. As many links are involved it should be a simple way to perform the
job. So not to have the macro be changed for each other case.

You can set a macro to run when clicked in a cell, but I'm not sure
that's the best approach here. Can you post one of your hyperlinks;
I have an idea but I need a specific example to work on.
 
J

Just Merks

Hi Stan,

I do not have such a hyperlink on hand. It is generated by sharepoint from
our intranet.

I was able to open the hyperlink using a macro, but I do not know how I can
easy run a macro by clicking a cell.

regards,

Just
 
S

Stan Brown

regards,

Just
I do not have such a hyperlink on hand. It is generated by
sharepoint from our intranet.

I was able to open the hyperlink using a macro, but I do not know how I can
easy run a macro by clicking a cell.

I'm not a VBA expert, but I think event macros are your friend here.
Scanning the list quickly, I think SelectionChange is what you want,
but another one might be more appropriate. (Inside the macro, check
which cell the user clicked into. If it's your hyperlink, go there;
otherwise do nothing.)

But if this is an intranet, can't you get around the whole problem by
using a mapped drive, so that instead of
\\server\\path\path\path\path\....\path\file
you have just
p:\file
?
 
D

Dave Peterson

I'd do some testing to see if any string longer than 256 characters could be
used as a hyperlink -- with something like this:

Option Explicit
Sub testme()
Dim myHyper As String
myHyper = "http://www.microsoft.com"
ThisWorkbook.FollowHyperlink Address:=myHyper
End Sub

(change the string to what you need and run the macro manually)

But there is no click event in excel.

You may be able to use Worksheet_BeforeRightClick, or
Worksheet_BeforeDoubleClick, or Worksheet_SelectionChange, though.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top