Hi
My workbook (attached) has a macro "NewParticipator()" the execution of which takes about half a second from invocation to conclusion on my Excel 2003 machine (running under Citrix, Windows Server 2003).. The macro is invoked by clicking on the button labelled "P" in the commandbar attached to the workbook.
If I double-click in very rapid succession on the "P" button, the macro executes twice (as desired) and executes correctly.
If I click on the the "P" button, wait until the macro completes, and then click on it again, then again the macro executes twice, with correct results, as desired.
If I click on the "P" button twice in FAIRLY rapid succession, the second click being just before the conclusion of the first execution, maybe about a quarter of a second, or about half way through the first execution, then the macro runs twice (as desired) but the result contains an error.
The error is in the formula contained in Column K of the worksheet "Participators". In the first row (ie the row that is created by running the macro the first time), the formula in the relevant cell in column K appears as
='Provision (0)'!$D$2
and retunrs a value
"Provision (0)"
This is undesired. "Provision (0)" should never appear in the formula or result returned in any cell in column K of the worksheet "Participators", and the correct formulae and values are as returned when running the macro twice either with a delay between them or with a rapid double-click.
Can anyone tell me please
(1) what is causing this undesirable behaviour, and
(2) what should I do to combat it (other than avoiding running the macro with a delay of a quarter of a second between executions)?
Thanks
Bookmarks