jphanton00
New Member
- Joined
- Oct 26, 2012
- Messages
- 10
I need VBA code to test if a file in a directory is open before opening it. If the file is open then I want a message box to pop up letting the user know its open. Once the user clicks OK, then I want it to skip the next set of steps and move on to attempting to open the next file. If the file is not open then I want it to proceed with the next set of steps.
I already have a macro written that I would like to insert this code into. I can't figure out how to attach the code I currently have (its rather lengthy) to give you an idea of where I need it and what comes next. But the just of what I'm already doing is consolidating new entries on multiple files into one file. The other day someone was in one of the files I was trying to consolidate and it hung up my macro. So I just want it to bypass attempting to open it and move on to the next one.
I've already spent about 4 hours reasearching this and trying different codes, but nothing is working.
Thanks in advance for your help!!
I already have a macro written that I would like to insert this code into. I can't figure out how to attach the code I currently have (its rather lengthy) to give you an idea of where I need it and what comes next. But the just of what I'm already doing is consolidating new entries on multiple files into one file. The other day someone was in one of the files I was trying to consolidate and it hung up my macro. So I just want it to bypass attempting to open it and move on to the next one.
I've already spent about 4 hours reasearching this and trying different codes, but nothing is working.
Thanks in advance for your help!!