R
rvExcelTip
A spreadsheet has a Spin button that is linked to a cell. I want th
user to have the possibility of either to spin or to enter a valu
directly in the linked cell. So far, so good. Except that th
spreadsheet recalculates every time whilst spinning. As the amount o
calculation is quite important, the spinning is seriously slowed down
and the spreadsheet user's blood pressure is accordingly up.
I tried implementing a boolean on the spreadsheet module level and t
test/toggle it at the change/spinup or down event. But I hit upon
logical conundrum in that the order of events is first Change the
Spinup/Down and apparently there is no (?) way to detect the end of th
Spinning.
I then tried to add the KeyDown/KeyUp event. The idea was that the use
could decide for him/herself to quick spin or not (by pushing the Shif
key). Therefore I would disable calculation in KeyDown and t
re-enable it in KeyUp and then Call by code for the Change event. But
got into all sorts of trouble:
The event is reported as follows:
PRIVATE SUB[/B] -OBJECT-_*KEYDOWN(BYVAL* -KEYCODE- *A
MSFORMS.RETURNINTEGER, BYVAL* -SHIFT- AS FMSHIFTSTATE
When testing for the Shift value. e.g. If Shift = fmShiftMask Then ...
I got a compile error, telling that the fmShiftMask Constant wa
unkown. Why do I get an error for fmShiftMask? Did I forget to add
reference?
Alternatively when testing for its numerical value, which is presume
to be 1 for the SHIFT key, I discovered that the variable was alway
zero !!
Can somebody get me out of this trap? :confused
user to have the possibility of either to spin or to enter a valu
directly in the linked cell. So far, so good. Except that th
spreadsheet recalculates every time whilst spinning. As the amount o
calculation is quite important, the spinning is seriously slowed down
and the spreadsheet user's blood pressure is accordingly up.

I tried implementing a boolean on the spreadsheet module level and t
test/toggle it at the change/spinup or down event. But I hit upon
logical conundrum in that the order of events is first Change the
Spinup/Down and apparently there is no (?) way to detect the end of th
Spinning.
I then tried to add the KeyDown/KeyUp event. The idea was that the use
could decide for him/herself to quick spin or not (by pushing the Shif
key). Therefore I would disable calculation in KeyDown and t
re-enable it in KeyUp and then Call by code for the Change event. But
got into all sorts of trouble:
The event is reported as follows:
PRIVATE SUB[/B] -OBJECT-_*KEYDOWN(BYVAL* -KEYCODE- *A
MSFORMS.RETURNINTEGER, BYVAL* -SHIFT- AS FMSHIFTSTATE
When testing for the Shift value. e.g. If Shift = fmShiftMask Then ...
I got a compile error, telling that the fmShiftMask Constant wa
unkown. Why do I get an error for fmShiftMask? Did I forget to add
reference?
Alternatively when testing for its numerical value, which is presume
to be 1 for the SHIFT key, I discovered that the variable was alway
zero !!
Can somebody get me out of this trap? :confused