Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi!
I'm new to excel but kinda familiar with VBA for Access. I would like to copy stored shortcuts(.lnk) to the users desktop. I have the following code. I was trying the FileCopy but I'm pretty sure I should be using CopyFile. What do I need to make the FileSystemObject work? Private Sub cmdCreateDesktopShortcut_Click() 'Dim FSO As FileSystemObject Dim strUserDesktop Dim strDrive As String Dim strTempPath As String Dim strSrcePath As String 'Set FSO = New FileSystemObject 'Set up Source string strSrcePath = "bwes.net\Barberton file shares\DocControlPLM\BatchLoadFiles\ScriptsAndZips \Shortcuts\Consolidated - Approve.lnk" 'Set up Destination string strDrive = "D:" strTempPath = "\Documents and Settings\" & Environ("USERNAME") & "\Desktop\" strUserDesktop = Dir(strDrive & strTempPath) Kill strUserDesktop FileCopy strSrcePath, strUserDesktop End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Desktop Shortcut | New Users to Excel | |||
Desktop shortcut | Excel Programming | |||
how can i get office shortcut bar on the desktop? | Excel Discussion (Misc queries) | |||
Place Shortcut On Desktop | Excel Programming | |||
Desktop Shortcut | Excel Programming |