I have a SpinButton control on an Excel 2002 spreadsheet. On the
SpinButton1_SpinDown() function I call a ATL COM server method which
just sleeps for 200 milliseconds and then returns. When I hold the
mouse button on the down button( for a few seconds) and then release
it, the SpinButton control keeps the down button depressed and keeps
calling the SpinButton_SpinDown function for ever, i.e it is still
calling the SpinDown function long after i have released the mouse
button. The Spreadsheet will not accept any other commands, and the
only way I can get control back to the spreadsheet is by hitting the
escape button to break the code, or moving another window infront of
the excel application.

The Excel code is

Dim SCS As SimpleCOMServerLib.CSpinButtonOperation

Private Sub SpinButton1_SpinDown()
If SCS Is Nothing Then
Set SCS = CreateObject("SimpleCOMServer.CSpinButtonOperation")
End If

SCS.DoSpinOperation
end Sub

The CSpinButtonOperation exe is an Apartment threaded ATL COM exe. The
DoSpinOperation funtion is

STDMETHODIMP CCSpinButtonOperation::DoSpinOperation()
{
Sleep(200);
return S_OK;
}

Is there some rules with the SpinButton you need to follow so it
doesn't loop infinitly.
I notice that when using the up and down keys to tick down, the loop
doesn't happen. Its only when I hold down the mouse button

Any help is greatly appreciated

Cheers