ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Remove a shortcut from desktop using VBA code (https://www.excelbanter.com/excel-programming/436434-remove-shortcut-desktop-using-vba-code.html)

Larry[_14_]

Remove a shortcut from desktop using VBA code
 
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.
--
Larry

Peter T

Remove a shortcut from desktop using VBA code
 
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


"Larry" wrote in message
...
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.
--
Larry





All times are GMT +1. The time now is 08:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com