Hello dear community,
I have the following problem:
When I start an external Pascal program from Excel using VBA (Shell), the Pascal program is unable to find out its correct directory using GetCurrentDir, but instead GetCurrentDir returns my documents folder (where neither the excel file nor the Pascal file is in). When I start the program directly, not using Excel VBA, GetCurrentDir works fine. By now I have solved this by just not using GetCurrentDir, instead typing the correct directory, but I would like to be able to move the folder containing the programs without adjusting the program code.
Do you know why this problem might occur and how to solve it?
Thank you very much
Madding
Bookmarks