+ Reply to Thread
Results 1 to 3 of 3

Use a macro to create a desktop shortcut?

  1. #1

    Use a macro to create a desktop shortcut?

    Greetings Everyone,

    Our IT group is going to move our stuff to a new server. Everyone's
    links to 3 spreadsheets will be obsolete.

    I want to put an Excel file where everyone can get it and have a macro
    in it that will create shortcuts on the user's desktop. The shortcuts
    will be for three separate files.

    Thanks in advance for your thoughts.
    Glen Ray


  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486
    hi,
    on your desk top,
    right click and select new
    select shortcut
    goto browse
    and find the file
    select the file and it will show up on the desktop

  3. #3
    Bob Phillips
    Guest

    Re: Use a macro to create a desktop shortcut?

    Here is some code to create a desktop shortcut

    '----------------------------------------------------------------
    Sub CreateShortCut()
    '----------------------------------------------------------------
    Dim oWSH As Object
    Dim oShortcut As Object
    Dim sPathDeskTop As String

    Set oWSH = CreateObject("WScript.Shell")
    sPathDeskTop = oWSH.SpecialFolders("Desktop")

    Set oShortcut = oWSH.CreateShortCut(sPathDeskTop & "\" & _
    ActiveWorkbook.Name & ".lnk")
    With oShortcut
    .TargetPath = ActiveWorkbook.FullName
    .Save
    End With
    Set oWSH = Nothing

    End Sub


    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    <[email protected]> wrote in message
    news:[email protected]...
    > Greetings Everyone,
    >
    > Our IT group is going to move our stuff to a new server. Everyone's
    > links to 3 spreadsheets will be obsolete.
    >
    > I want to put an Excel file where everyone can get it and have a macro
    > in it that will create shortcuts on the user's desktop. The shortcuts
    > will be for three separate files.
    >
    > Thanks in advance for your thoughts.
    > Glen Ray
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1