Thread: A few questions
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Ed[_18_] Ed[_18_] is offline
external usenet poster
 
Posts: 118
Default A few questions

"Bob Flanagan" wrote in message
...
You can have lots of workbooks open when you run a macro. There is no
restriction. However, if you are opening up a workbook that is already
open, you are likely to get an error or lose data loaded into the workbook
if you reopen.

In my inexperience, I got myself into trouble with multiple workbooks
opening and closing. As far as I could track it, I was using ActiveWorkbook
and ActiveWorksheet, but the way the code was written the focus kept
changing. I set objects to the Active item as soon as it was activated,
then used the object reference. Also, forgetting to release that reference
gave me some fits, too. Hope you have better luck than I did!

Ed