Excel 2013 VBA - strange hyperlink behaviour

I've put hyperlinks in cells via VBA like this.
wksErrorPage.Hyperlinks.Add wksErrorPage.Cells(iRowOnErrorSheet, 4), "", wksDetails.Name & "!" + strErrorCell1

Open in new window


BUT
Although the hyperlink is actually there, and clickable
It's not visible in the cell
Cannot make visible by applying a color (but can apply background color to the cell)
It doesn't appear in the Formula Bar (and yes, the cell is not formatted ;;;)

Sometimes it is normal! Sometimes not!

Is there a scenario where this could happen?
hindersalivaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

[ fanpages ]IT Services ConsultantCommented:
Hi,

I am not quite sure what you were expecting from that statement, given that some of the pertinent information is absent (or set to ""):

wksErrorPage.Hyperlinks.Add wksErrorPage.Cells(iRowOnErrorSheet, 4), "", wksDetails.Name & "!" + strErrorCell1

Is this meant to be:

wksErrorPage.Hyperlinks.Add Anchor:=wksErrorPage.Cells(iRowOnErrorSheet, 4), Address:="", TextToDisplay:=wksDetails.Name & "!" + strErrorCell1

...or...

wksErrorPage.Hyperlinks.Add Anchor:=wksErrorPage.Cells(iRowOnErrorSheet, 4), TextToDisplay:="", Address:=wksDetails.Name & "!" + strErrorCell1

Does explicitly specifying the parameters & providing a value for each of the three parameters resolve the issue?

For example:

wksErrorPage.Hyperlinks.Add Anchor:=wksErrorPage.Cells(iRowOnErrorSheet, 4), TextToDisplay:="Click Me", Address:=wksDetails.Name & "!" + strErrorCell1
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
hindersalivaAuthor Commented:
Sorry!. Here it is
wksErrorPage.Hyperlinks.Add wksErrorPage.Cells(20, 4), "", "TheDetailSheet" & "!" + "C5"
0
Roy CoxGroup Finance ManagerCommented:
Your code works fine for me, so any problems must be in the worksheet. Check

Home -> Styles -> Right click on the 'Hyperlink style' -> Modify  and see what is selected
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

hindersalivaAuthor Commented:
Roy_Cox, I've checked. It's a normal color font.

Any other ideas? Thanks.
0
Roy CoxGroup Finance ManagerCommented:
Can you attach the workbook, I cannot replicate this problem

Does this occur in any other workbooks?
0
hindersalivaAuthor Commented:
We decided to take a different route, so never got to solve this.
I'm closing the question and dividing the points between you guys.
0
Roy CoxGroup Finance ManagerCommented:
Glad you sorted it, what did you actually decide to do?
0
hindersalivaAuthor Commented:
The client decided not to use 'hyperlinks to the error values', but instead to list the error values that he was interested in. Thankfully!
0
Roy CoxGroup Finance ManagerCommented:
Thanks for the update
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.