ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Create a shortcut to a folder with VBA (https://www.excelbanter.com/excel-programming/392874-create-shortcut-folder-vba.html)

Otto Moehrbach

Create a shortcut to a folder with VBA
 
Excel XP & Win XP
I found some code in the site below that creates a desktop shortcut to the
active file. It works well. But what I want to do is place, on the
desktop, a shortcut to a folder, not to a file. Can anyone help me to
modify this code, or create new code to create a shortcut to a folder and
place the shortcut on the desktop? Thanks for your time. Otto

http://www.vba-programmer.com/Snippe..._Creation.html



Tom Ogilvy

Create a shortcut to a folder with VBA
 
Dir you try changing

lsPath = Application.Path & "\" & Application.Name'

to

lsPath = "C:\Myfolder\MySubFolder"

--
Regards,
Tom Ogilvy


"Otto Moehrbach" wrote:

Excel XP & Win XP
I found some code in the site below that creates a desktop shortcut to the
active file. It works well. But what I want to do is place, on the
desktop, a shortcut to a folder, not to a file. Can anyone help me to
modify this code, or create new code to create a shortcut to a folder and
place the shortcut on the desktop? Thanks for your time. Otto

http://www.vba-programmer.com/Snippe..._Creation.html




Otto Moehrbach

Create a shortcut to a folder with VBA
 
Thanks Tom. I'll try it in the morning. Otto
"Tom Ogilvy" wrote in message
...
Dir you try changing

lsPath = Application.Path & "\" & Application.Name'

to

lsPath = "C:\Myfolder\MySubFolder"

--
Regards,
Tom Ogilvy


"Otto Moehrbach" wrote:

Excel XP & Win XP
I found some code in the site below that creates a desktop shortcut to
the
active file. It works well. But what I want to do is place, on the
desktop, a shortcut to a folder, not to a file. Can anyone help me to
modify this code, or create new code to create a shortcut to a folder and
place the shortcut on the desktop? Thanks for your time. Otto

http://www.vba-programmer.com/Snippe..._Creation.html






Otto Moehrbach

Create a shortcut to a folder with VBA
 
That worked great. Thanks again. Otto
"Tom Ogilvy" wrote in message
...
Dir you try changing

lsPath = Application.Path & "\" & Application.Name'

to

lsPath = "C:\Myfolder\MySubFolder"

--
Regards,
Tom Ogilvy


"Otto Moehrbach" wrote:

Excel XP & Win XP
I found some code in the site below that creates a desktop shortcut to
the
active file. It works well. But what I want to do is place, on the
desktop, a shortcut to a folder, not to a file. Can anyone help me to
modify this code, or create new code to create a shortcut to a folder and
place the shortcut on the desktop? Thanks for your time. Otto

http://www.vba-programmer.com/Snippe..._Creation.html







All times are GMT +1. The time now is 05:25 PM.

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