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

EXCEL µo¥XÁn­µ

EXCEL µo¥XÁn­µ

¦³¤@­Ó¤u§@ªí»Ý­n¤£°±¿é¤J¸ê®Æ
¯à§_§Q¥ÎIF ±ø¥ó, ·í¿é¤J¸ê®Æ¹J¨ì¿ù»~®Éµo¥XÁn­µ
½Ð«ü±Ð

¥»©«³Ì«á¥Ñ av8d ©ó 2012-6-29 19:38 ½s¿è

¦^´_ 1# enoch


   

¬O³o¼Ë¶Ü?
©Î¬O
Dim S1$
If S1 <> "" Then
        With ¤u§@ªí1.WindowsMediaPlayer1     '¥[¤JMediaPlayer¼½©ñ­µ¼Ö
            .URL = "D:\§Úªº­µ¼Ö¦WºÙ.mp3"  '½Ð­×§ï­µ¼ÖÀÉ®×
            .Visible = False        'ÁôÂÃWindowsMediaPlayer¤¸¥ó
            .Controls.Play          '¼½©ñ­µ¼Ö
        End With
End If

³Æµù: °O±o¥ý´¡¤J¤@­ÓWindowsMediaPlayer1¤¸¥ó

D:\§Úªº­µ¼Ö¦WºÙ.mp3   ¬Ý§A­µ¼Ö¬O©ñC:ÁÙ¬OD:~¥H¤W½d¨Ò¬O©ñ¦bD:

TOP

¦³¤@­Ó¤u§@ªí»Ý­n¤£°±¿é¤J¸ê®Æ
¯à§_§Q¥ÎIF ±ø¥ó, ·í¿é¤J¸ê®Æ¹J¨ì¿ù»~®Éµo¥XÁn­µ
½Ð«ü±Ð
enoch µoªí©ó 2012-6-29 17:56


VBA ¤º«Ø¥\¯à,¦ý«D±`²ÓÁn
  1. if .... then
  2.     Call Beep
  3. end if
½Æ»s¥N½X
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

¤µ¤éの¤@¬íは  ©ú¤éにない
http://kimbalko-chi.blogspot.com
http://kimbalko.blogspot.com

TOP

¥ý­n¸Ñ¨Mªº¬OEXCEL¦p¦ó¯à±oª¾§A¿é¤J¿ù»~¡H
¦p¥´¤@½g¤å³¹¡A¥´¿ù¦r®ÉµoÁn´£¿ô¡H

TOP

¦hÁ«ü±Ð,
­ì¨Ó¥[¤WÁn­µ¬O³o»ò²³æªº¤èªk²³æ,
¦ý½Ð°Ý°£¤F BEEP ¥~, ÁÙ¦³¨ä¥¦¤º«ØªºÁn­µ¿ï¾Ü¶Ü

¥t¥~¦bEXCEL ¦p¦ó´¡¤JWindowsMediaPlayer¤¸¥ó©O

TOP

¥»©«³Ì«á¥Ñ oobird ©ó 2012-6-30 13:26 ½s¿è

http://www.funp.net/955169
­ì©«ªº³sµ²¡Ghttp://qa.pcuser.com.tw/modules/ ... =41630&forum=24

TOP

¥»©«³Ì«á¥Ñ av8d ©ó 2012-7-3 08:25 ½s¿è

¦^´_ 5# enoch


   


¥t¥~´£¨Ñ§A¤@­Ó¥i¥Hµo¥XÁn­µªº~
¬O§Q¥Î¨ç¼Æ¥hµo¥XÁn­µªº~¤]ÆZ¹ê¥Îªº~

¦b Excel ¤¤, «ö Alt F11 ¶i¤J Visiual Basic ½s¿è¾¹µe­±,
ÂI¿ï [´¡¤J]/[¼Ò²Õ], µe­±·|¸õ¥Xµ{¦¡½Xµøµ¡, ¦b¸Ì­±½Æ»s¶K¤W¦p¤Uµ{¦¡:
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Function SndPlay(Pathname As String) As Long
SndPlay = sndPlaySound(Pathname, SND_ASYNC)
End Function

µM«á¤Á´«¦^¨ì Excel ¤u§@ªí, ¦b¬Y­ÓÀx¦s®æ(¤£¬OA1©ÎC5)¿é¤J¦p¤U¤½¦¡:
=IF(A1 < C5,sndplay("C:\Windows\Media\Windows XP ¹q¸Ü¹aÁn.wav"),0)

µù: »Ý½T©w "C:\Windows\Media\ "¸Ì¦³ "Windows XP ¹q¸Ü¹aÁn.wav" ³o­ÓÀÉ®×
©ó¬O¦b A1 ©M C5 ¸Ì¤À§O¿é¤J¼Æ¦r, ·í A1 ¤p©ó C5 ªº®É­Ô,
¹q¸£´N·|¼½©ñ¹q¸Ü¹aÁn

Âà¸ü©ó http://tw.group.knowledge.yahoo.com/smt-knowldge/listitem/view?iid=15

TOP

¦^´_ 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

¤£¦n·N«ä, §Ú¹ê¦b¤£©ú¥Õ¿ù¦b¨º¸Ì,
¥i§_¦A¦¸«ü±Ð¶Ü?

sound.zip (9.87 KB)

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

        ÀR«ä¦Û¦b : ¬Ý§O¤H¤£¶¶²´¡A¬O¦Û¤v­×¾i¤£°÷¡C
ªð¦^¦Cªí ¤W¤@¥DÃD