Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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)

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default How to get the path where a shortcut of an Excel sheet is located

Sorry, I am pretty sure that the OS does the translation of the sortcut and
Excel is passed the real file not the shortcut. So there is no way from
inside Excel to know where the shortcut is.

Peter

"Stefan Mueller" wrote:

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)


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default How to get the path where a shortcut of an Excel sheet is located

Hmm, but how can the VB's FileListBox do it?
Actually, the VB FileListBox doesn't show the path where the shortcut
is located, it shows the path entered in 'Start in:' of the shortcut.

Do you think I can somehow get this information within Excel?

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
Keyboard shortcut to flick from sheet to sheet in Excel? Karina85 Excel Discussion (Misc queries) 1 April 30th 10 06:45 AM
Can the source in data validataion be located in another sheet? trainer07 Excel Discussion (Misc queries) 2 May 10th 07 11:06 PM
Extract Target path from a shortcut WhytheQ Excel Programming 2 January 12th 06 12:39 PM
make an excel worksheet (sheet 2) open w/ the cursor located in t. animated text in excel worksheet Excel Discussion (Misc queries) 0 February 10th 05 10:29 PM
How to find the path where a .XLA is located Belinda Excel Programming 2 March 2nd 04 06:37 AM


All times are GMT +1. The time now is 09:27 AM.

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

About Us

"It's about Microsoft Excel"