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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top