Hello,
I would like a code example that checks whether a specific folder is already open or not.
Regards,
Spyros
Hello,
I would like a code example that checks whether a specific folder is already open or not.
Regards,
Spyros
Maybe:
Function:
Sample use;![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
Hello John,
Thanks for you reply but i am asking to check for a folder and not for a file.
Regards,
Spyros
Sorry for the misunderstanding. Hope someone can help you.
See this link
http://www.excelforum.com/excel-prog...r-is-open.html
John
If you have issues with Code I've provided, I appreciate your feedback.
In the event Code provided resolves your issue, please mark your Thread as SOLVED.
If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.
Thanks for the suggestion, the thing is that i am not so advanced and i cannot overcome an error i get error.png
That is the code i am trying to use. where ""U:\myfolder\mysubfolder\"" is an example of the folder that i interested in(mysubfolder) path.
any help will be appreciated.![]()
Please Login or Register to view this content.
Regards,
spyros
I would guess it is the followhyperlink that is the problem, you probably need:
However, what your code will do is check every window you have open and if that is not the folder you are looking for it will open the folder again. You probably need something like:![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
Well your new line individually works, but now i am getting another error2.png when i am trying to run the routine.
![]()
Please Login or Register to view this content.
Err, I think that wnd.document.folder will only work for things that have a folder (e.g. windows explorer) and not for applications. The proper way to fix this would be the determine the type of each item in oshell.windows and only run the if statement for ones that have the folder property.
Afraid I don't know how to do that but you can get round it with something like:
![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks