![]() |
Opening a shortcut in a macro.
Hi all,
What I am trying to do is to open an Excel file in a macro but using a shortcut. The following code works: Workbooks.Open("FileName.xls) The following code does not work: WorkBooks.Open("FileNameShortcut") Nor WorkBooks.Open("FileNameShortcut.xls") I do have th same problem with the FileSearch function. Any Idea on how to perform taht ? Thanks, nde |
Opening a shortcut in a macro.
Try using the shell command with the shortcut name (.lnk extension).
-- Regards, Tom Ogilvy "nde" wrote: Hi all, What I am trying to do is to open an Excel file in a macro but using a shortcut. The following code works: Workbooks.Open("FileName.xls) The following code does not work: WorkBooks.Open("FileNameShortcut") Nor WorkBooks.Open("FileNameShortcut.xls") I do have th same problem with the FileSearch function. Any Idea on how to perform taht ? Thanks, nde |
Opening a shortcut in a macro.
Worked perferctly with the lnk extension.
Thanks a lot, you made my day ! Nde "Tom Ogilvy" wrote: Try using the shell command with the shortcut name (.lnk extension). -- Regards, Tom Ogilvy "nde" wrote: Hi all, What I am trying to do is to open an Excel file in a macro but using a shortcut. The following code works: Workbooks.Open("FileName.xls) The following code does not work: WorkBooks.Open("FileNameShortcut") Nor WorkBooks.Open("FileNameShortcut.xls") I do have th same problem with the FileSearch function. Any Idea on how to perform taht ? Thanks, nde |
All times are GMT +1. The time now is 11:22 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com