hi to all!

I am doing following work to publish graphs in html formate using "save as webpage" using MS office 2000

I have put all code into a macro and run it everyday, this pages are the upload on webserver regularly. u can take a look at here: http://www.kshitij.com/graphgallery/eurcandle.shtml

the work is:

I open a master excel file, from where I publish each section graph and code are made in VBA.

when i run one macro it will do following:
1) open the data file with graph
2) then publish them as html
3) save the graph data file and close them
4) run same set for next date file.........there is 6 or 7 set like this.

but the problem is we are using LAN and if any date file is already opened on aother machine, excel giving me message that "file is already in use" with OK and CANCEL button

if i do OK then readonly file has opened and graphs is beining published, and its not current save data file, wrong data is being published on graph.........

and
if do CANCEL then whole process of macro being stopped halfway and i need to run full macro again.......which wastage of time

so i need to prevent this problem and for this i need to know is there any VBA code.......which do the following:

1) when some data file is opened on some other machine on LAN......it will give message that is opened somewhere and if press OK......then it should execute next set of code instead of this current set or work.......like this it will do till end of the macro coding..........

2) if i told the person to whom the date file is opened on another machine, to close it........he will save it and close..........after that when i press OK or CANCEL will it take or re-open current data file again and do the rest of job..............it will do the same for rest of the set.........


the example of coding some same sets as follows:

Please Login or Register  to view this content.

so here if "nasdaq.xls" is already open on someother's machine.......then on press of OK it will take readonly file of it and published wrong graphs and if i press cancle then it stop there only............rest of the work never get finished.

can any one help me on this?

Thanks in advance.