Public Function GetTarget(strPath As String) As String
'Hämtar sökvägen från en genväg
On Error GoTo Error_Loading
Dim wshShell As Object
Dim wshLink As Object
Set wshShell = CreateObject("WScript.Shell")
Set wshLink = wshShell.CreateShortcut(strPath)
GetTarget = wshLink.TargetPath
Set wshLink = Nothing
Set wshShell = Nothing
Exit Function
Error_Loading:
GetTarget = "Ett fel inträffade."
End Function