When I click directly in the .exe file "PrintUsers.exe", the output is correct. But when I do that through VBA using Shell the result is different. It tries to find the text file in another directory. Why? See figure:
SOLUTION: I am now using: GetModuleFileName(NULL, szEXEPath, 2048) instead of GetCurrentDir(buff, FILENAME_MAX);
SOLUTION: I am now using: GetModuleFileName(NULL, szEXEPath, 2048) instead of GetCurrentDir(buff, FILENAME_MAX);