I was working on a project today and was using Application.Run* to call a sub. The sub has a call to a File Picker (it uses Application.GetOpenFileName) and I was surprised that the select file window did not appear (instead it showed my error handling messages and exited the sub) so I started investigating.
If I use immediate window tothen everything works normally (the File Picker appears)![]()
Please Login or Register to view this content.
However if I use immediate window tothen the code screws up! It seems that everything works normally right up to the point of Application.GetOpenFileName. At that point, the file select window does not appear. The result returns False (as if I had cancelled selecting a file).![]()
Please Login or Register to view this content.
I tried googling this issue and couldn't find anything conclusive.
- Is anyone else aware of this? (I'd be interested to hear your experiences)
- Is anyone aware of a solution/workaround for this issue? (Short of using Call!)
* I normally use Call instead of Application.Run to call a sub. However I am currently working on some code where I am unable to use Call so I have to use Application.Run
Bookmarks