Hyperlink works but text displayed says 0

Peter Thompson

Active Member
Joined
Dec 15, 2008
Messages
262
All,

I am having an issue with Hyperlinks. Both the address and the text to display use the same string variable, however, while the hyperlink will open up the file the text being diplayed in the cell just says 0.

I have bolded th ehyperlink lines for quick reference.

Has anyone come accross this before?

strextensionoutputrefs3 = Mid(strOutputRefs, Len(strOutputRefs) - 3, 1)
StrextensionOutputRefs4 = Mid(strOutputRefs, Len(strOutputRefs) - 4, 1)

If strextensionoutputrefs3 = "." Or strextensionoutpurefs4 = "." Then

wksData.Hyperlinks.Add anchor:=Cells(i, 19), Address:= _
strOutputRefs _
, TextToDisplay:= _
strOutputRefs

Else


End If
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Peter, That's really strange.
Is there anything special going on in your worksheet that could affect those cells, such as Event code or Data Validation?

There appears to be a typo in one variable name:
If strextensionoutputrefs3 = "." Or strextensionoutpurefs4 = "." Then

...but that shouldn't cause the problem you describe.
 
Upvote 0

Forum statistics

Threads
1,224,527
Messages
6,179,357
Members
452,907
Latest member
Roland Deschain

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top