The environment this is occuring in is a corporate one where there are
a number of Excel workbooks each with VBA modules that are deisgned
for different tasks.  Occassionally someone tells me a macro has
failed, and when I check they usually have two or more Excel workbooks
open.  Closing all workbooks and then reopening just the one which
failed usually lets it run successfully. So there must be some kind of
interaction at the macro level between these workbooks. Some of the
modules occur in more than one Excel workbook and there may be common
sheet names as well.  I was wondering if there is a way to isolate the
macro, in either code or some other way, so it only interacts with its
parent workbook or whether this should be happening anyway?  Perhaps a
better way of implmenting workbooks in such an environment is
required? VSTO perhaps?

Thanks

Don

On May 31, 2:03 pm, Stuart Redmann <dertop...@web.de> wrote:
> On 30 Mai, 02:26, donvreug <donvr...@gmail.com> wrote:
>
> > Some of the macros I have written sometimes do not function correctly
> > if another instance of Excel is open. The other instance usually also
> > contains macros that may or may not have been executed.  I thought I
> > read somewhere that this is a common problem but a recent search has
> > not turned up anything.  Does anyone know of a solution to this or any
> > tips to minimise the chances of this happening?  I am using both Excel
> > 2003 and 2007.  Thanks.
>
> I encountered quite the reverse: I use a macro that creates another
> workbook and adds code to it. If I let this newly created workbook run
> in the same instance of Excel, it reliably crashes (Excel 2003). The
> solution for me was to launch a separate instance of Excel, disable
> the macro processing inside this instance and create the workbook
> there (the performance overhead of using the other OutProc Excel
> instance is negligible in my case).
>
> To say something about your problem is quite hard since you have
> provided very little background information. Are the other instances
> of Excel in any way related to your instance?
>
> Regards,
> Stuart

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 7000 subscribers worldwide and receive many nice notes about the 
learning and support from the group.Let friends and co-workers know they can 
subscribe to group at http://groups.google.com/group/excel-macros/subscribe

Reply via email to