LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Flashing Cell

Chip Pearson : Playing WAV Files From VBA
http://www.cpearson.com/excel/excelM.htm#PlayWAV

A the top of a module outside of any procedures, place the following
declaration.

Declare Function sndPlaySound32 Lib "winmm.dll" Alias _
"sndPlaySoundA" (ByVal lpszSoundName As String, _
ByVal uFlags As Long) As Long

Then, to call the function, passing it the name of the WAV file you
want to play:

Call sndPlaySound32("c:\test\MySound.WAV", 0)

-------------------------------------------------------------------------------------------------------

Just some background references on using events :

David McRitchie
http://www.mvps.org/dmcritchie/excel/event.htm

Chip Pearson
http://www.cpearson.com/excel/events.htm

Right click the sheet that contains the cell that changes. Select
'View Code'. Place the following code in the sheet's module. Adjust
the references as needed.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)

If Target = Range("A1") Then
If Target.Value 20 Then _
Call sndPlaySound32("c:\test\MySound.WAV", 0)
End If

End Sub

---------------------------------------------------------------------------------------------------------------

HTH
Paul
--------------------------------------------------------------------------------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------------------------------------------
Hi

Does anyone one know how I can get a cell to flash and/or
make noise when it reacheds a certain value. I am trying
to alert the users.

Regards

Zak


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cell flashing MAX Excel Worksheet Functions 2 April 24th 09 07:32 PM
flashing of a cell or row prakash Excel Discussion (Misc queries) 2 October 24th 07 12:45 PM
flashing cell because Excel Discussion (Misc queries) 3 May 27th 07 01:16 PM
Cell flashing Skioregon Excel Discussion (Misc queries) 1 October 10th 05 09:33 PM
flashing cell Rob at BTAS Inc. New Users to Excel 7 February 6th 05 02:49 AM


All times are GMT +1. The time now is 07:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"