Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Using Office 2003 and Windows XP:
I've been slamming it pretty hard today and maybe I'm just tired, but I'm having a conflict between events in a workbook and although I'm positive there is an easy solution, I can't see it right now. I have the following functions in my ThisWorkbook module: Workbook_Open contains Function_1 and Function_2 Workbook_Activate contains Function_1 and Function_3 Workbook_Deactivate contains Function_4 and Function_5 Workbook_BeforeClose contains Function_4 and Function_6 How can I keep these functions from duplicating one another. When the user opens the workbook, the above will fire function 1 twice, causing a problem. When the user closes the file, function 4 will fire twice; yet when the user switches between workbooks (or opens or closes the file), I need functions 1 and 4 to run once for their respective events...how can I accomplish this? Thanks again for your help... |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
By what you write, it is firing on the open and the activate, and on close
and deactivate, why not just take the function out of the open and close? Following what you wrote the activation and deactivation should take care of it. -- -John Please rate when your question is answered to help us and others know what is helpful. "XP" wrote: Using Office 2003 and Windows XP: I've been slamming it pretty hard today and maybe I'm just tired, but I'm having a conflict between events in a workbook and although I'm positive there is an easy solution, I can't see it right now. I have the following functions in my ThisWorkbook module: Workbook_Open contains Function_1 and Function_2 Workbook_Activate contains Function_1 and Function_3 Workbook_Deactivate contains Function_4 and Function_5 Workbook_BeforeClose contains Function_4 and Function_6 How can I keep these functions from duplicating one another. When the user opens the workbook, the above will fire function 1 twice, causing a problem. When the user closes the file, function 4 will fire twice; yet when the user switches between workbooks (or opens or closes the file), I need functions 1 and 4 to run once for their respective events...how can I accomplish this? Thanks again for your help... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
do events? background events | Excel Programming | |||
New to Events | Excel Programming | |||
Dueling programs | Excel Programming | |||
events? | Excel Discussion (Misc queries) | |||
Need some events... | Excel Programming |