ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

EXCEL µo¥XÁn­µ

¦^´_ 5# enoch
1.¦Û­q¨ç¼Æ
2.Àx¦s®æ¼g¤U¤½¦¡¦p:  =IF(A1>5,PlaySound(TRUE),PlaySound(FALSE))
  1. Option Explicit
  2. Function PlaySound(Msg As Boolean)
  3.     Dim Spath As String, Cmd As String
  4.     Spath = "C:\Windows\Media\" & IIf(Msg, "Windows XP ±Ò°Ê.wav", "Windows XP µn¥X­µ®Ä.wav")
  5.     '¦s©ñ­µ®Äªº¸ô®|: "C:\Windows\Media\"
  6.     Cmd = "C:\Program Files\Windows Media Player\wmplayer.exe " & Chr(34) & Spath & Chr(34)
  7.     '¼½©ñ­µ®Äªºµ{¦¡: "C:\Program Files\Windows Media Player\wmplayer.exe " <-³o¸Ì­nªÅ¤@®æ
  8.     Shell Cmd, 0
  9. End Function
½Æ»s¥N½X

TOP

¦^´_ 9# enoch
§A¤Ö¤F\
Function PlaySound(Msg As Boolean)
    Dim Spath As String, Cmd As String
    Spath = "C:\Windows\Media\" & IIf(Msg, "Windows ¶}­»Âb.wav", "Windows ³qª¾.wav")
    '¦s©ñ­µ®Äªº¸ô®|: "C:\Windows\Media\"
    Cmd = "C:\Program Files (x86)\Windows Media Player\wmplayer.exe " & Chr(34) & Spath & Chr(34)
    '¼½©ñ­µ®Äªºµ{¦¡: "C:\Program Files\Windows Media Player\wmplayer.exe " <-³o¸Ì­nªÅ¤@®æ
    Shell Cmd, 0
End Function

TOP

¦^´_ 18# ¦Û§Ú·Pı¨}¦n
  1. Option Explicit
  2. 'API Class to take care of playing the file
  3. Public Declare Function sndPlaySound32 Lib "winmm.dll" _
  4. Alias "sndPlaySoundA" (ByVal lpszSoundName As String, _
  5.                         ByVal uFlags As Long) As Long
  6. Sub VBASound()
  7.     'Call Api to play LoadIt.wav witch is in the same folder as
  8.     'the active document!->ActiveWorkbook
  9.     Call sndPlaySound32(ActiveWorkbook.Path & "\LoadIt.WAV", 0)
  10.    
  11. End Sub
½Æ»s¥N½X

TOP

¦^´_ 20# ¦Û§Ú·Pı¨}¦n
§A¬O¦bExcel À³¥Îµ{¦¡ªºVBA

  Call sndPlaySound32(ActiveWorkbook.Path & "\LoadIt.WAV", 0)

TOP

¦^´_ 23# ¦Û§Ú·Pı¨}¦n
´N¦b³o¥DÃD²z

TOP

        ÀR«ä¦Û¦b : ¬°¤H³B¥@­n¤p¤ß²Ó¤ß¡A¦ý¤£­n¡u¤p¤ß²´¡v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD