I'm changing the name of several worksheets at the same time, but some of them have shortcuts, and in the middle of the change I want the shortcuts to accompany that change.
Sub changeTargetPath()
Set wsc = WScript.CreateObject("WScript.Shell")
Set Lnk = wsc.CreateShortcut(wsc.SpecialFolders("desktop") & "\tabela 1.lnk")
Lnk.targetpath = """C:\Users\leandro.moreira\Desktop\tabela 1.xlsx"" C:\Users\leandro.moreira\Desktop\atalho 2.xlsx"
Lnk.Description = "tabela 1"
Lnk.Arguments = "C:\Users\leandro.moreira\Desktop\atalho 2.xlsx"
Lnk.Save
End Sub
What I did code for is this.