Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have recently used and adapted code from a post on here which is shown
below and works great. However does anybody know how I can (or if it can be done?) adapt this further so that entering a different "name" plays a different sound file in the same cell i.e. C7 in this case. Many thanks, Nige Option Explicit Private Declare Function sndPlaySound32 Lib "winmm.dll" Alias _ "sndPlaySoundA" (ByVal lpszSoundName As String, _ ByVal uFlags As Long) As Long Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$C$7" Then If Target.Value = "Lawrence" Then sndPlaySound32 "C:\Documents and Settings\LAPTOP\My Documents\homer_31.wav", 0 End If End If End Sub -- NG99 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cell References | Excel Discussion (Misc queries) | |||
Saving worksheet in new file with date AND cell value as file name | Excel Discussion (Misc queries) | |||
Help with this conditional IF statement | Excel Discussion (Misc queries) | |||
resetting last cell | Excel Discussion (Misc queries) | |||
Using Jet to read excel file returns blank for last cell - sometim | Excel Discussion (Misc queries) |