하이퍼 링크를 편집하는 방법을 보았습니다. 그러나 사용자 지정 수식으로 사용할 때는 하이퍼 링크를 추가해야합니다.VBA UDF에 하이퍼 링크 추가
나는 # VALUE 오류가 발생하며 이유가 확실하지 않습니다. 난 단지 값을 반환 할 수 있습니다 =testit39()
Public Function testit39() As String
Application.Volatile
Dim rng As range, milestoneinfo As String, milestonesymbol As String
Set rng = Application.Caller
milestoneinfo = "info"
milestonesymbol = "symbol"
If rng.Hyperlinks.Count > 0 Then
rng.Hyperlinks(1).address = ""
rng.Hyperlinks(1).screentip = milestoneinfo
Else
ThisWorkbook.ActiveSheet.Hyperlinks.Add Anchor:=rng, _
address:="", _
screentip:=milestoneinfo
rng.Hyperlinks(1).screentip = milestoneinfo
End If
testit39 = milestonesymbol
End Function
실제로는 가능하지만 복잡한 해결 방법이 필요합니다. http://stackoverflow.com/questions/8520732/i-dont-want-my-excel-add-in-to-return-an-array-instead-i-need-a-udf-to-change – brettdj
복잡하지 않음 하이퍼 링크 기능을 사용하는 경우 .. http://optionexplicitvba.blogspot.co.uk/2011/04/rollover-b8-ov1.html – Wickey312