double sound alert for on-line stream
A simple function can only modify the cell into which it is entered.
To change several cells, create an array function and enter it as an array
in the worksheet:
Function arySample() As Variant
arySample = Array(1, 2, 3)
End Function
and in the worksheet, highlight A1,B1,C1 and
=arySample()
and enter with CNTRL-SHFT-ENTER rather than just the ENTER key.
--
Gary''s Student - gsnu200816
"PAT" wrote:
can anyone help design a macro that serves as a sound & message alert in
Excel sheet?
It would have to be able to monitor the value in cell A1 (that comes in as a
feed from a DDE link - continous streaming). The alert would be activated
when the value on A1 matches the criteria in cell C1 and according to the
sign ( ,< or = ) on D1, e.g. A1 C1 or A1 < C1 or A1 = C1 or =< C1 etc...
When activated, the macro would speak up the value on C1 - say " the quote
is (value of C1) " - and would repeat 4 times the announcement and show a
message saying the same thing, until an OK button is hit.
Then all over again for one more alert but for a different cell to be
monitored, A2, to be matched with C2 according to the sign on D2 , all on the
same sheet as A1 etc..
The catch is that since the value is streaming continuously - say every
second, the alert will be activated continously every second ( independently
of the repetition).There would have to be a brake to make the alert stop when
A1 hits the value of C1 until it is reset by punching an OK button!
Much appreciate any help on that...
PAT
|