Desktopverknüpfung bringt falsche Excelversion
Klaus
was ist zu tun, damit die nachfolgende Prozedur (in Excel 2003 erstellt) die Datei mit Excel _
2003 und nicht mit dem parallel installierten Excel 2010 öffnet?
Sub TM1_ICONAufDesktop()
Dim IstPfad As String
Dim Dateiname As String
On Error Resume Next
Dim wsh As Object
Dim tarLink As Object
Dim tarDeskTop As String
Dim tarFileName As String
Dim tarFilePath As String
Set wsh = CreateObject("WScript.Shell")
tarDeskTop = wsh.SpecialFolders("Desktop")
'IstPfad = ThisWorkbook.Path ' Problem bleibt
IstPfad = Application.DefaultFilePath + "\TM1\"
Dateiname = IstPfad + "\Testmappe1.xls"
tarFilePath = Dateiname
tarFileName = "Verknüpfung mit Testmappe1.xls"
Set tarLink = wsh.CreateShortcut(tarDeskTop & _
"\" & tarFileName & ".lnk")
With tarLink
.Targetpath = tarFilePath
.Save
End With
Set wsh = Nothing
End Sub
Schon mal Dank vorab!
Gruß Klaus