Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
We have macros that use a legacy program and either
extracts information from or updates info to the legacy program. Our instructions always tell the users to OPEN the legacy program first, before starting the macro. We set the legacy program as an object and then refer to the object throughout the macro. Is there a way for a macro to launch a desktop shortcut or search for a file name on a PC's hard drive to start the legacy program? Thanks..... |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This launched a desktop shortcut for me:
Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _ (ByVal hwnd As Long, ByVal lpOperation As String, _ ByVal lpFile As String, ByVal lpParameters As String, _ ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Sub LaunchLNK() Dim DeskTop As String DeskTop = CreateObject("WScript.Shell").SpecialFolders.Item( "Desktop") ShellExecute 0, "Open", DeskTop & "\ztree.lnk", "", "C:\", 1 End Sub -- Jim Rech Excel MVP "JT" wrote in message ... We have macros that use a legacy program and either extracts information from or updates info to the legacy program. Our instructions always tell the users to OPEN the legacy program first, before starting the macro. We set the legacy program as an object and then refer to the object throughout the macro. Is there a way for a macro to launch a desktop shortcut or search for a file name on a PC's hard drive to start the legacy program? Thanks..... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Add-In Launch | Excel Discussion (Misc queries) | |||
shortcut has change or move so this shortcut can not open | Excel Worksheet Functions | |||
xls file will not launch | Excel Discussion (Misc queries) | |||
File won't launch | Excel Discussion (Misc queries) | |||
Can't launch Excel | Excel Discussion (Misc queries) |