Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default Creating a SHORTCUT to a file in XLSTART

probably a lot easier than I imagine this one!
i'd like to progrmmatically create a shortcut to a file in my XLstart file.

anybody any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default Creating a SHORTCUT to a file in XLSTART

You can use the WScript shell object. The sub below will find the XLstart
folder and place a shortcut called StartABC that targets the workbook
C:\test\abc.xls.

Sub xlstartLINK()
Dim wsh As Object
Dim lnk As Variant
Dim strXLstart As String
strXLstart = Application.StartupPath
Set wsh = CreateObject("WScript.Shell")
Set lnk = wsh.CreateShortcut(strXLstart & "\StartABC.lnk")
lnk.TargetPath = "C:\test\abc.xls"
lnk.Save
End Sub

Steve


"jason" wrote in message
om...
probably a lot easier than I imagine this one!
i'd like to progrmmatically create a shortcut to a file in my XLstart

file.

anybody any ideas?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default Creating a SHORTCUT to a file in XLSTART

Cheers Steve

"Steve Yandl" wrote in message ...
You can use the WScript shell object. The sub below will find the XLstart
folder and place a shortcut called StartABC that targets the workbook
C:\test\abc.xls.

Sub xlstartLINK()
Dim wsh As Object
Dim lnk As Variant
Dim strXLstart As String
strXLstart = Application.StartupPath
Set wsh = CreateObject("WScript.Shell")
Set lnk = wsh.CreateShortcut(strXLstart & "\StartABC.lnk")
lnk.TargetPath = "C:\test\abc.xls"
lnk.Save
End Sub

Steve


"jason" wrote in message
om...
probably a lot easier than I imagine this one!
i'd like to progrmmatically create a shortcut to a file in my XLstart

file.

anybody any ideas?

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
Adding a file to xlstart folder. Tenacious Excel Discussion (Misc queries) 3 April 6th 09 04:24 AM
xlstart not starting file Patrick Excel Discussion (Misc queries) 2 January 10th 08 08:22 PM
XLSTART-Creating a toolbar Andre Setting up and Configuration of Excel 2 November 1st 07 05:20 PM
I cannot load Excel from Office, a problem creating XLStart? Ian Setting up and Configuration of Excel 0 February 13th 06 08:41 PM
xlstart file is not the same I saved sj1960 Excel Discussion (Misc queries) 1 May 3rd 05 05:41 PM


All times are GMT +1. The time now is 09:27 AM.

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"