Hello Excel and VBA gurus. I've been having a hard time solving this problem. Its probably a very simple solution and you're gonna laugh at me, but its just that i have a lack of knowledge of the various 'workbook' functions and how they act and such... "this", "active", opening, when to use a path, when to use the name of the file, etc... Anyway, here is the rundown:
I have Two files: "ICE1.xls" and "Standards.xls". The file location of "ICE1.xls" varies and hopefully isnt vital to solving this problem. The file location of "standards.xls" is "c:\Standards.xls".
The gist of whats going on:
I open ICE1 manually. I start the macro. It does some fancy things in ICE1. Then it opens STANDARDS, copies some things, closes STANDARDS, and goes back into ICE1 and pastes the data. I made the macro and everything works well if STANDARDS is CLOSED when i start the macro. However, if STANDARDS is open when i start the macro, it gives me a popup saying that its open, everything goes crazy and all hell breaks loose.
What i would like to do:
Run macro. Determine if STANDARDS is open. If it is open -> Close it and then go back to the program where it can Re-open STANDARDS (or maybe i should go to it right off the bat if that is simpler?), do some fancy things, close STANDARDS, and then put that data into ICE1.
OR
Run Macro. Determine if STANDARDS is open. If its NOT OPEN-> open it, do some fancy things, close standards, and put the data into ICE1.
I'm having trouble determining if its open, and where to go from there in order to be sure that ICE1 will be the activated workbook after i have closed STANDARDS.
Sorry if something doesn't make sense. I'm not good with words.
Thank you!
Bookmarks