Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
do you have a cell which stores your 10 day average. If yes change the function call to =Alarm (B13,"=" & cell_with_10_day_average) BTW this is not an Excel build-feature but a tip/function from John Walkenbach! -- Regards Frank Kabel Frankfurt, Germany I understand that you can use the alarm function to play a sound when a certain parameter has been met, but what if the parameters keep changing. eg. for stock, the volume is constantly being updated and increases. I want to set an alarm that will notice when the volume of a stock reaches a value of its 10 day average. therefore I need to be able to compare to separate cell references. the following formula is what i found that sound a wav file if a cell reference and a condition are met: =Alarm (B13,"=1000") the documentation also stated this following code to be used for the alarm to sound 'Windows API function declaration Private Declare Function PlaySound Lib "winmm.dll" _ Alias "PlaySoundA" (ByVal lpszName As String, _ ByVal hModule As Long, ByVal dwFlags As Long) As Long Function Alarm(Cell, Condition) Dim WAVFile As String Const SND_ASYNC = &H1 Const SND_FILENAME = &H20000 On Error GoTo ErrHandler If Evaluate(Cell.Value & Condition) Then WAVFile = ThisWorkbook.Path & "\sound.wav" 'Edit this statement Call PlaySound(WAVFile, 0&, SND_ASYNC Or SND_FILENAME) Alarm = True Exit Function End If ErrHandler: Alarm = False End Function if there is anyone that can help me with this problem please email me or message me. thanks very much in advance for anyone that can help me. cheers --- Message posted from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do i set an alarm to work on excel | Excel Worksheet Functions | |||
How can I set an alarm Excel? | Excel Discussion (Misc queries) | |||
Alarm function, disable sound if data is erased | Excel Worksheet Functions | |||
How to set an alarm in excel... | Excel Discussion (Misc queries) | |||
How can a set an alarm in Excel? | Excel Discussion (Misc queries) |