[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XL_ Conflicting Macros from two simultaneously open .xls files



PureBytes Links

Trading Reference Links

Oops.  Sent this to omega list again by accident.  Sorry about that, folks.


Hi, Paul.

The solution turned out to be just to open Excel (the program) twice and 
load each spreadsheet into its own separate invocation of Excel.  Since I 
did that, there's been no further conflict between the two spreadsheets.

Thanks for your help in getting this debugged.

Regards,
Ullrich

At 06:26 PM 12/8/1999 -0500, you wrote:
>Ullrich,
>I don't know if you can dynamically enable/disable a macro.  However, you
>might be able to suspend events in workbook A just prior to activating
>workbook B.  Would that solve your problem of conflicting actions?  I don't
>know if you can queue up events for later processing or if they demand
>immediate attention.  You might need to use the critical path method that
>someone else described in addition to suspending events.  I'm way out on
>thin ice here so I'm only sending this to you.  If you want to forward it to
>the list for others' comments, go ahead.  It might also be possible to act
>on events differently depending on whether the event took place in workbook
>A or workbook B.
>
>Paul
>----- Original Message -----
>From: Ullrich Fischer <uf@xxxxxxxxxxxxxxxxxxx>
>To: Paul M. Zislis <pzislis@xxxxxxxxx>
>Sent: Tuesday, December 07, 1999 8:25 PM
>Subject: Re: XL_ Conflicting Macros from two simultaneously open .xls files
>
>
> > Thanks, Paul.
> >
> > That works.  Unfortunately, when I put it in the macro that activates
> > spreadsheet calculation, it activates the spreadsheet containing that
>macro
> > as soon as either spreadsheet is recalculated.  I guess I need to have
>some
> > way to turn off the calculation driven macro while the timer drive one is
> > doing its thing.  I need to have the appropriate spreadsheet active while
> > its macro runs.  Is there a command to disable and re-enable a specific
>macro?
> >
> > -uf
> >
> > At 03:41 PM 12/7/1999 -0500, you wrote:
> > >To activate the workbook whose name (including the appropriate extension,
> > >e.g., ".xls") is in the string Filename:
> > >     Workbooks(Filename).Activate
> > >
> > >Paul Zislis
> > >----- Original Message -----
> > >From: Ullrich Fischer <uf@xxxxxxxxxxxxxxxxxxx>
> > >To: Paul M. Zislis <pzislis@xxxxxxxxx>
> > >Cc: <xltraders@xxxxxxxxxxxxxx>
> > >Sent: Tuesday, December 07, 1999 3:02 PM
> > >Subject: Re: XL_ Conflicting Macros from two simultaneously open .xls
>files
> > >
> > >
> > > > Right, normally this isn't a problem, but both these spreadsheets have
> > > > macros that are event driven.  One kicks in after 2.5 minutes have
>elapsed
> > > > since the last time it was run.  The other kicks in whenever the
> > > > spreadsheet is recalculated which is whenever a tick from eSignal
>comes in
> > > > for the 25 stocks that I'm tracking with it.   Is there any way to
>change
> > > > the active worksheet under macro control?  When I tried recording a
>macro
> > > > of me changing focus from one spreadsheet to the other, it just stored
>the
> > > > code to select a particular cell on the currently active
>orksheet.  -uf
> > > >
> > > >
> > > > At 07:24 AM 12/7/1999 -0500, you wrote:
> > > > >When you have multiple worksheets open with multiple macro modules:
> > > > >1) when you invoke a macro it is applied to the currently active
> > >worksheet.
> > > > >So, make sure the worksheet upon which you you want to operate is
>active
> > > > >before involking the macro.
> > > > >2) if you use ALT-F8 to invoke a macro, all known macros are listed
>and
> > >you
> > > > >select the one you want to apply.  I'm not sure what happens if you
>use
> > > > >shortcut keys to invoke a macro, but even if you have shortcuts, you
>can
> > > > >still invole a macro using ALT-F8.
> > > > >
> > > > >Paul Zislis
> > > > >----- Original Message -----
> > > > >From: Ullrich Fischer <uf@xxxxxxxxxxxxxxxxxxx>
> > > > >To: <xltraders@xxxxxxxxxxxxxx>
> > > > >Sent: Monday, December 06, 1999 9:39 PM
> > > > >Subject: XL_ Conflicting Macros from two simultaneously open .xls
>files
> > > > >
> > > > >
> > > > > > I've got two spreadsheets (each with its own macros) that I can't
>open
> > >at
> > > > > > the same time without risking that the actions specified by the
>macro
> > >in
> > > > > > one workbook (.xls file) will be applied to the data in the other.
> > > > > >
> > > > > > Is there any way to specify at the beginning of a macro subroutine
> > >that
> > > > >the
> > > > > > following code is to apply to a specific workbook only?  One of
>the
> > >macros
> > > > > > (in markethealth.xls) executes automatically every 2.5 minutes
>once it
> > >is
> > > > > > manually kicked off for the first time.  The other (in alarm1.xls)
> > > > >executes
> > > > > > whenever the spreadsheet is recalculated.
> > > > > >
> > > > > > Is there any way to have two instances of Excel running at the
>same
> > > > > > time?  Currently, whenever I open a new spreadsheet by double
>clicking
> > >it,
> > > > > > the new spreadsheet is brought up in my existing Excel session as
> > >another
> > > > > > Window.  -uf
> > > >
> > > >
> >