+ Reply to Thread
Results 1 to 6 of 6

Excel Icon Programming

  1. #1
    caldog
    Guest

    Excel Icon Programming

    Trying to develop several worksheets, that will go out to several of our
    facilities. When these facilities are loading these worksheets, all I want
    them to do is install and icon on their deskup that will give them access to
    these install sheets. I will have these sheets blocked so using this Icon is
    their only way to gain access to the install sheets.

    Can a desktop Icon be developed by using either Excel or VBA?

    Steve

  2. #2
    Bob Phillips
    Guest

    Re: Excel Icon Programming

    This will create a desktop shortcut if that is what you mean


    '----------------------------------------------------------------
    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

    "caldog" <caldog@discussions.microsoft.com> wrote in message
    news:9346987D-85C5-42FD-8C02-9B647B04F0F4@microsoft.com...
    > Trying to develop several worksheets, that will go out to several of our
    > facilities. When these facilities are loading these worksheets, all I

    want
    > them to do is install and icon on their deskup that will give them access

    to
    > these install sheets. I will have these sheets blocked so using this Icon

    is
    > their only way to gain access to the install sheets.
    >
    > Can a desktop Icon be developed by using either Excel or VBA?
    >
    > Steve




  3. #3
    caldog
    Guest

    Re: Excel Icon Programming

    Thanks Bob

    For everything to work correctly, and I am asking you this question becasue
    I am fairly new at VBA code, where should this code be placed to work like I
    want i to
    ?

    Steve
    "Bob Phillips" wrote:

    > This will create a desktop shortcut if that is what you mean
    >
    >
    > '----------------------------------------------------------------
    > 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
    >
    > "caldog" <caldog@discussions.microsoft.com> wrote in message
    > news:9346987D-85C5-42FD-8C02-9B647B04F0F4@microsoft.com...
    > > Trying to develop several worksheets, that will go out to several of our
    > > facilities. When these facilities are loading these worksheets, all I

    > want
    > > them to do is install and icon on their deskup that will give them access

    > to
    > > these install sheets. I will have these sheets blocked so using this Icon

    > is
    > > their only way to gain access to the install sheets.
    > >
    > > Can a desktop Icon be developed by using either Excel or VBA?
    > >
    > > Steve

    >
    >
    >


  4. #4
    caldog
    Guest

    Re: Excel Icon Programming

    Still looking for help in how to use the code that Bob said to use, very new
    at VBA.

    Steve

    "caldog" wrote:

    > Thanks Bob
    >
    > For everything to work correctly, and I am asking you this question becasue
    > I am fairly new at VBA code, where should this code be placed to work like I
    > want i to
    > ?
    >
    > Steve
    > "Bob Phillips" wrote:
    >
    > > This will create a desktop shortcut if that is what you mean
    > >
    > >
    > > '----------------------------------------------------------------
    > > 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
    > >
    > > "caldog" <caldog@discussions.microsoft.com> wrote in message
    > > news:9346987D-85C5-42FD-8C02-9B647B04F0F4@microsoft.com...
    > > > Trying to develop several worksheets, that will go out to several of our
    > > > facilities. When these facilities are loading these worksheets, all I

    > > want
    > > > them to do is install and icon on their deskup that will give them access

    > > to
    > > > these install sheets. I will have these sheets blocked so using this Icon

    > > is
    > > > their only way to gain access to the install sheets.
    > > >
    > > > Can a desktop Icon be developed by using either Excel or VBA?
    > > >
    > > > Steve

    > >
    > >
    > >


  5. #5
    Nick Hebb
    Guest

    Re: Excel Icon Programming

    You could put it in an Excel file with a single command button that
    runs the macro, then email the Excel file to all your users.

    Or you could put it in a VBS file (just a text file with a .vbs
    extension) and mail that out. I don't know if it would make it through
    the mail servers though - probably get tagged as a virus.


  6. #6
    Bob Phillips
    Guest

    Re: Excel Icon Programming

    Sorry to take so long to reply, different time zones meant I was fast asleep
    when you posted :-).

    The code should go into a standard code module (Alt-F11, Insert>Module).

    To know which workbook or whatever to add it to would require more detail on
    how you will work with all of this, there are many options.

    --
    HTH

    Bob Phillips

    "caldog" <caldog@discussions.microsoft.com> wrote in message
    news:73986ECC-BDE8-44B0-AFBE-794E7D3B37C2@microsoft.com...
    > Still looking for help in how to use the code that Bob said to use, very

    new
    > at VBA.
    >
    > Steve
    >
    > "caldog" wrote:
    >
    > > Thanks Bob
    > >
    > > For everything to work correctly, and I am asking you this question

    becasue
    > > I am fairly new at VBA code, where should this code be placed to work

    like I
    > > want i to
    > > ?
    > >
    > > Steve
    > > "Bob Phillips" wrote:
    > >
    > > > This will create a desktop shortcut if that is what you mean
    > > >
    > > >
    > > > '----------------------------------------------------------------
    > > > 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
    > > >
    > > > "caldog" <caldog@discussions.microsoft.com> wrote in message
    > > > news:9346987D-85C5-42FD-8C02-9B647B04F0F4@microsoft.com...
    > > > > Trying to develop several worksheets, that will go out to several of

    our
    > > > > facilities. When these facilities are loading these worksheets, all

    I
    > > > want
    > > > > them to do is install and icon on their deskup that will give them

    access
    > > > to
    > > > > these install sheets. I will have these sheets blocked so using

    this Icon
    > > > is
    > > > > their only way to gain access to the install sheets.
    > > > >
    > > > > Can a desktop Icon be developed by using either Excel or VBA?
    > > > >
    > > > > Steve
    > > >
    > > >
    > > >




+ 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