View Single Post
  #20   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default How to get the current path

Stefan,
Yes, that's what I understand.

You could put some code in the Workbook_Open event of the workbook in
question to set CurDir, but this obviously will not be linked to the StartIn
parameter of the short cut.

NickHK

"Stefan Mueller" wrote in message
oups.com...
Hi NickHK

You are absolutely right!
In VB6 the function CurDir does exactly what I tried to do with a
hidden FileListBox.
Many thanks for that hint and sorry for my confusion. I'm still a
beginner ;-)

I don't exactly know which path the function CurDir in VBA (e.g.
Excel) shows. I just now it's not the path entered in 'Start In:'.
If I understand you right: there is no possibility to read the path
entered in 'Start In:' within VBA because Excel doesn't know how it
(the worksheet) has been started (direct or via shortcut) because it's
not an executable.
Is this correct?

Many thanks
Stefan