View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
HeatherO HeatherO is offline
external usenet poster
 
Posts: 41
Default Late Binding issues when closing workbooks

I have used late binding to access excel workbooks from my word macro. The
problem I appear to be having is that when I run the macro the first time it
runs smoothly. However if I run it again some of my files (ones for the mail
merge) are locked and won't open when I am trying to open them in the macro.
I do have it in my code to close those workbooks and quit the application.
Is there any way to test for the workbook.open command failing when it
doesn't open a workbook for this reason?
Is there a way of opening a workbook so that you would not get the locked
for editing by another user and notification of when it's available message?
Also when the macro bombs all the files and application are left open
causing errors when I am trying to debug it again, is there any quick fix to
clean up the files and close the application if the macro bombs before it has
a chance to do those things?
Any help is appreciated.
Thanks,
Heather