View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Stefan Mueller[_2_] Stefan Mueller[_2_] is offline
external usenet poster
 
Posts: 20
Default How to get the path where a shortcut of an Excel sheet is located

If you start an Excel sheet (e.g. Test.xls) you can get the path where
the Excel sheet is located with
MsgBox (ActiveWorkbook.Path)

Now you create a shortcut (e.g. Shortcut of Test.xls) and move it to
another directory. If you start that shortcut
MsgBox (ActiveWorkbook.Path)
still shows the path where the Excel sheet is located.

Does someone know how to get the path where the shortcut is located?

PS: In real VB I do it with a FileListBox: MsgBox (FileListBox1.Path)