Remove a shortcut from desktop using VBA code

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.
 
P

Peter T

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
 
Top