I have a weird behavior in Visual Basic for Applications. I am adding a bunch of Hyperlinks to a Worksheet, but once the Filename contains a "#" char, Excel thinks it's finished at this point and cuts off the rest.
I tried to investigate it, but in msgbox, debug.print, write to cell etc it doesn't happen at all.
does anybody have an idea?
this is one of the correct Hyperlinks as printed in debug.print:
C:\Users\czbrlu\Documents\DATASYNC\1_PROJEKTE\1_REVOLVERGUN\RN37_MILLENNIUM_DWGDM228\TDP_Mrz2021\DWGDM228AA\C2081###RD-NB-E-1.tif
in the Worksheet the same link looks like this:
C:\Users\czbrlu\Documents\DATASYNC\1_PROJEKTE\1_REVOLVERGUN\RN37_MILLENNIUM_DWGDM228\TDP_Mrz2021\DWGDM228AA\C2081
EDIT: The Code is not much. But anyway, here it is:
Sub Hyperlink()
With Worksheets(1)
.Hyperlinks.Add Anchor:=.Cells(1, 1), _
Address:="C:\Users\lukas\Desktop\aswd\PF-60##-1493.pdf", _
TextToDisplay:="Link"
End With
End Sub