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

Hi there

Is it possible to use VBA to generate desktop shortcut to a workbook?

Thanks

Michael
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Desktop Shortcut

If you have Scripting enabled, refer to

http://www.rb-ad.dircon.co.uk/rob/ex...velop/index.ht

Otherwise, if you have the appropriate DLLs, refer to

http://support.microsoft.com/default...NoWebContent=1
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Desktop Shortcut

Hi Michael,

Michael Rekas wrote:
Is it possible to use VBA to generate desktop shortcut to a workbook?


set a reference on "Windows Scripting Host Object Model"-library

Sub DesktopShortcut()
Dim WSHShell As IWshShell
Set WSHShell = New IWshShell_Class

With WSHShell.CreateShortcut( _
WSHShell.SpecialFolders("Desktop") & "\" & ActiveWorkbook.Name & ".lnk")
.TargetPath = ActiveWorkbook.FullName
.Save
End With
End Sub

--
Mit freundlichen Grüssen

Melanie Breden
- Microsoft MVP für Excel -

http://excel.codebooks.de (Das Excel-VBA Codebook)

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Desktop Shortcut

Thank you for the replies. I like the "Windows Scripting Host Object
Model" code.

However is it possible to automatically set the reference to the
library?

Michael


On Tue, 27 Apr 2004 09:57:21 +0200, Michael Rekas
wrote:

Hi there

Is it possible to use VBA to generate desktop shortcut to a workbook?

Thanks

Michael


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Desktop Shortcut

Hallo Michael,

Michael Rekas wrote:
Thank you for the replies. I like the "Windows Scripting Host Object
Model" code.

However is it possible to automatically set the reference to the
library?



with the following defining no reference must be set:

Dim WSHShell As Object
Set WSHShell = CreateObject("WScript.Shell")

--
Mit freundlichen Grüssen

Melanie Breden
- Microsoft MVP für Excel -

http://excel.codebooks.de (Das Excel-VBA Codebook)



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Desktop Shortcut

Hello Melanie

Excellent! Works perfectly.

Thanks

Michael

On Tue, 27 Apr 2004 19:06:23 +0200, "Melanie Breden"
wrote:

Hallo Michael,

Michael Rekas wrote:
Thank you for the replies. I like the "Windows Scripting Host Object
Model" code.

However is it possible to automatically set the reference to the
library?



with the following defining no reference must be set:

Dim WSHShell As Object
Set WSHShell = CreateObject("WScript.Shell")


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
CREATE DESKTOP SHORTCUT? PARSLEY DUMPLING Excel Discussion (Misc queries) 2 July 30th 09 11:51 AM
How do I place shortcut to a particular document on my desktop? Tina Excel Discussion (Misc queries) 0 January 23rd 08 02:17 AM
Desktop Shortcut Tom New Users to Excel 1 October 23rd 06 01:00 AM
how can i get office shortcut bar on the desktop? sath Excel Discussion (Misc queries) 3 June 21st 06 03:31 PM
Sending a shortcut to the desktop Paul Excel Discussion (Misc queries) 1 February 21st 05 08:06 PM


All times are GMT +1. The time now is 01:51 AM.

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

About Us

"It's about Microsoft Excel"