Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Desktop Shorcuts

Is there a way that I can (via VBA) create a shortcut to a spreadsheet or
folder on the desktop.
(Example: My application (wizard) has data for the user to fill out. When
he/she presses finish, the wizard fills out the form, creates a folder and
saves the form into that folder. The user then would like the wizard to
create a desktop shortcut to that folder so that he/she can work with the
files at a later time (Engineering Maintenence).
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Desktop Shorcuts

Here's an example:

Sub MakeDesktopShortcut()
Dim wsh As Object
Dim SC As Object
Dim DesktopPath As String
Set wsh = CreateObject("WScript.Shell")
DesktopPath = wsh.SpecialFolders.Item("Desktop")
Set SC = wsh.CreateShortcut(DesktopPath & "\test.lnk")
SC.TargetPath = "C:\book1.xls"
SC.Hotkey = "CTRL+ALT+Z"
SC.Save
Set wsh = Nothing
End Sub

--
Jim Rech
Excel MVP
"asmenut" wrote in message
...
| Is there a way that I can (via VBA) create a shortcut to a spreadsheet or
| folder on the desktop.
| (Example: My application (wizard) has data for the user to fill out. When
| he/she presses finish, the wizard fills out the form, creates a folder and
| saves the form into that folder. The user then would like the wizard to
| create a desktop shortcut to that folder so that he/she can work with the
| files at a later time (Engineering Maintenence).


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Desktop Shorcuts


ahhhhh amaaazing,... that was just what I needed to deliver a project t
a client.

thanks loads!

--
FastOneBa
-----------------------------------------------------------------------
FastOneBaz's Profile: http://www.excelforum.com/member.php...nfo&userid=973
View this thread: http://www.excelforum.com/showthread.php?threadid=26924

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
EXCEL FILES SAVED TO DESKTOP WILL NOT OPEN FROM DESKTOP randy111 Excel Discussion (Misc queries) 3 January 13th 08 10:38 PM
Shorcuts or Macro for Creating If Else Statements excel wonk Excel Worksheet Functions 2 June 2nd 07 07:35 PM
Excel shorcuts m_john New Users to Excel 1 August 26th 05 02:55 PM
Shorcuts k f h Excel Discussion (Misc queries) 2 May 26th 05 05:42 PM
disabling shorcuts Ron de Bruin Excel Programming 0 August 3rd 03 12:03 PM


All times are GMT +1. The time now is 03:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"