I have an application which can be used for different data environments on a single PC.
The application is therefor placed in different folders.
Example:
X:\Software\Radio\Software
X:\Software\Radio\Data
X:\Software\Radio\Data\User\[username]\Reports
X:\Software\TV\Software
X:\Software\TV\Data
X:\Software\TV\Data\User\[username]\Reports
In the application when you choose open/save the CommonDialog is used for selecting an in/output file.
The InitDir property of the CommonDialog is used to jump to the correct location.
Sometime when using the TV environment the statement CD.InitDir = "X:\Software\TV\Data\User\Arnoutdv\Reports" seems to be ignored and the CD opens in "X:\Software\Radio\Data\User\Arnoutdv\Reports"
I've placed logging statements in the Open/Save routines to show the initial path variable and the content of CD.InitDir, even when they both show the correct values the CD opens in the incorrect folder.
It does not happen all of time time and the OS varies from W7 to W10
For my life I can not get it to simulate from the IDE (where I can also choose from multiple data environments).
I found a similar thread on StackOverflow and I've read some forum posts in which is stated that the CommonDialog persists it's own "recent" folders per application somewhere in the registry
Sometimes the CD.InitDir is ignored and a folder from it's "recent used folder" is used for the initial folder.
Thread on vbForums discussing the same problem.
Has anyone ever encountered the same and found a workaround?
The application is therefor placed in different folders.
Example:
X:\Software\Radio\Software
X:\Software\Radio\Data
X:\Software\Radio\Data\User\[username]\Reports
X:\Software\TV\Software
X:\Software\TV\Data
X:\Software\TV\Data\User\[username]\Reports
In the application when you choose open/save the CommonDialog is used for selecting an in/output file.
The InitDir property of the CommonDialog is used to jump to the correct location.
Sometime when using the TV environment the statement CD.InitDir = "X:\Software\TV\Data\User\Arnoutdv\Reports" seems to be ignored and the CD opens in "X:\Software\Radio\Data\User\Arnoutdv\Reports"
I've placed logging statements in the Open/Save routines to show the initial path variable and the content of CD.InitDir, even when they both show the correct values the CD opens in the incorrect folder.
It does not happen all of time time and the OS varies from W7 to W10
For my life I can not get it to simulate from the IDE (where I can also choose from multiple data environments).
I found a similar thread on StackOverflow and I've read some forum posts in which is stated that the CommonDialog persists it's own "recent" folders per application somewhere in the registry
Sometimes the CD.InitDir is ignored and a folder from it's "recent used folder" is used for the initial folder.
Thread on vbForums discussing the same problem.
Has anyone ever encountered the same and found a workaround?