View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_7_] Bob Phillips[_7_] is offline
external usenet poster
 
Posts: 1,120
Default Adding Sound to Program Revisited

Where have you stored the PlayWav File function? It, and the API
declaration, should be in the same module as the call, or as Public
definitions in a standard code module.

--
HTH

Bob Phillips

"Carlton Patterson" wrote in message
...
Hello all,

I chap called Bob Phillips assisted me in adding sound to a program,
however when I tried to create my own program with sound it wouldn't
work. I was wondering if someone here could point out where I might be
going wrong. I keep on getting the error message : Sub or Function not
defined. I think its because I somehow haven't declared "playwavfile"
but I'm not sure. Any help would be appreciated.

Private Sub Worksheet_Calculate()
Static prevValue
If Range("I1").Value prevValue Then
PlayWavFile "C:\Windows\Media\Windows XP Print complete"
prevValue = Range("I1").Value
End If
End Sub

Cheers

Carlton

*** Sent via Developersdex http://www.developersdex.com ***