Remove a shortcut from desktop using VBA code

  • Thread starter Thread starter Larry
  • Start date Start date
L

Larry

I have a program that uses VBA code to creates a shortcut on the desktop. I
want another program to remove that shortcut. Can someone show me how to
remove a shortcut using VBA code. Thank you very much.
 
Di sFile as String

sFile = "C:\Documents and Settings\<username>\Desktop\myShortcut.lnk"
Kill sFile

obviously change the path and shortcut name to suit

Regards,
Peter T
 
Back
Top