From: sarndt on
I have a workbook that has multiple worksheets - all sharing the same code in
the workbook, worksheets, module, and class module.

When I process events on the first worksheet everthing works correctly.
When I move to the other worksheets, everything works fine. When I move back
to the first worksheet again, the events repeat themselves multiple times
depending on the number of other worksheets I activated. For example, I go
to the second worksheet and back to the first worksheet, the events run 2
times instead of 1 time. I go to the third worksheet and back to the first
worksheet, the events run 3 times instead of 1 time.

Anyone have thoughts on why would occur and how I could stop it. I control
EnableEvents religiously throughout the code to stop the duplication of
events. And it works for everything except when I'm switching from one of
the other sheets back to the first sheet.

Thanks

Steve
From: JLGWhiz on
Do you want to share the event code? That is probably where the answer
lies.


"sarndt" <sarndt(a)discussions.microsoft.com> wrote in message
news:9345D39E-0B5F-4749-80AC-2AEA8B19FDF8(a)microsoft.com...
>I have a workbook that has multiple worksheets - all sharing the same code
>in
> the workbook, worksheets, module, and class module.
>
> When I process events on the first worksheet everthing works correctly.
> When I move to the other worksheets, everything works fine. When I move
> back
> to the first worksheet again, the events repeat themselves multiple times
> depending on the number of other worksheets I activated. For example, I
> go
> to the second worksheet and back to the first worksheet, the events run 2
> times instead of 1 time. I go to the third worksheet and back to the
> first
> worksheet, the events run 3 times instead of 1 time.
>
> Anyone have thoughts on why would occur and how I could stop it. I
> control
> EnableEvents religiously throughout the code to stop the duplication of
> events. And it works for everything except when I'm switching from one of
> the other sheets back to the first sheet.
>
> Thanks
>
> Steve


From: sarndt on
If you mean between the worksheets, no I don't. Each worksheet should stand
independent of the rest.

Steve

--------

"sarndt" wrote:

> I have a workbook that has multiple worksheets - all sharing the same code in
> the workbook, worksheets, module, and class module.
>
> When I process events on the first worksheet everthing works correctly.
> When I move to the other worksheets, everything works fine. When I move back
> to the first worksheet again, the events repeat themselves multiple times
> depending on the number of other worksheets I activated. For example, I go
> to the second worksheet and back to the first worksheet, the events run 2
> times instead of 1 time. I go to the third worksheet and back to the first
> worksheet, the events run 3 times instead of 1 time.
>
> Anyone have thoughts on why would occur and how I could stop it. I control
> EnableEvents religiously throughout the code to stop the duplication of
> events. And it works for everything except when I'm switching from one of
> the other sheets back to the first sheet.
>
> Thanks
>
> Steve
From: JLGWhiz on
Without viewing the code, any suggetion to correct the problem would be a
wild guess. The problem has to be in your code since Excel does not
generate events on its own. If you do not want to post the relevant code,
then you will probably not find much help on this site.



"sarndt" <sarndt(a)discussions.microsoft.com> wrote in message
news:1FA28DFA-54D6-41B9-B9EC-7AFACA596171(a)microsoft.com...
> If you mean between the worksheets, no I don't. Each worksheet should
> stand
> independent of the rest.
>
> Steve
>
> --------
>
> "sarndt" wrote:
>
>> I have a workbook that has multiple worksheets - all sharing the same
>> code in
>> the workbook, worksheets, module, and class module.
>>
>> When I process events on the first worksheet everthing works correctly.
>> When I move to the other worksheets, everything works fine. When I move
>> back
>> to the first worksheet again, the events repeat themselves multiple times
>> depending on the number of other worksheets I activated. For example, I
>> go
>> to the second worksheet and back to the first worksheet, the events run 2
>> times instead of 1 time. I go to the third worksheet and back to the
>> first
>> worksheet, the events run 3 times instead of 1 time.
>>
>> Anyone have thoughts on why would occur and how I could stop it. I
>> control
>> EnableEvents religiously throughout the code to stop the duplication of
>> events. And it works for everything except when I'm switching from one
>> of
>> the other sheets back to the first sheet.
>>
>> Thanks
>>
>> Steve


From: JLGWhiz on
As a further comment, it appears from your description that the relevant
code would be in either the worksheet code module or the ThisWorkbook code
module and is either related to the Worksheet_Change or the
WorksheetSelection_Change events.



"sarndt" <sarndt(a)discussions.microsoft.com> wrote in message
news:1FA28DFA-54D6-41B9-B9EC-7AFACA596171(a)microsoft.com...
> If you mean between the worksheets, no I don't. Each worksheet should
> stand
> independent of the rest.
>
> Steve
>
> --------
>
> "sarndt" wrote:
>
>> I have a workbook that has multiple worksheets - all sharing the same
>> code in
>> the workbook, worksheets, module, and class module.
>>
>> When I process events on the first worksheet everthing works correctly.
>> When I move to the other worksheets, everything works fine. When I move
>> back
>> to the first worksheet again, the events repeat themselves multiple times
>> depending on the number of other worksheets I activated. For example, I
>> go
>> to the second worksheet and back to the first worksheet, the events run 2
>> times instead of 1 time. I go to the third worksheet and back to the
>> first
>> worksheet, the events run 3 times instead of 1 time.
>>
>> Anyone have thoughts on why would occur and how I could stop it. I
>> control
>> EnableEvents religiously throughout the code to stop the duplication of
>> events. And it works for everything except when I'm switching from one
>> of
>> the other sheets back to the first sheet.
>>
>> Thanks
>>
>> Steve