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

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?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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:

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


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

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"
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
Rowby Goren Makes an Impact on Screen and Online

Learn about longtime user Rowby Goren and his great contributions to the site. We explore his method for posing questions that are likely to yield a solution, and take a look at how his career transformed from a Hollywood writer to a website entrepreneur.

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

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

Does this occur in any other workbooks?
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.
Roy CoxGroup Finance ManagerCommented:
Glad you sorted it, what did you actually decide to do?
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!
Roy CoxGroup Finance ManagerCommented:
Thanks for the update
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.