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

½Ð°Ý¦p¦ó§ó§ï¼Æ­È¬°¦³Án­µ!!!

½Ð°Ý¦p¦ó§ó§ï¼Æ­È¬°¦³Án­µ!!!

¦U¦ì¤j¤j ¦n:
¤p§Ì·Q½Ð°Ý¡A¥Ø«e³o­ÓÀɮ׬OA2©ÎA6ªº¼Æ¦r§C©ó100®É¡A·|µo¥XÁn­µ¡A
¨º½Ð°Ý¦pªG·íA2>A6ªº¼Æ¦r1.5­¿®É¡A©Î¬OA2<A6ªº¼Æ¦r1.5­¿®É¡A¤]·QÅý¹q¸£µo¥XÁn­µ¡A
³oÀ³¸Ó­n¦p¦ó¼W¥[©O?
·PÁ¦U¦ì¤j¤jªº¸Ñ´b!!!

Option Explicit
'«Å§iª«¥óÅܼÆ
Dim objwmplayer As Object
   
'¼½©ñ©Î°±¤î¼½©ñ­µ¼Ö
Sub playmusic(songpath As String, Play_Or_Stop As Boolean)
    If objwmplayer Is Nothing Then auto_open
    '¦pªG Sheet1_Change ¨Æ¥ó¶Ç True µ¹ÅÜ¼Æ Play_Or_Stop
    If Play_Or_Stop Then
        '¼½©ñ songpath ÅܼƩҫü©wªº­µ¼Ö
        objwmplayer.Open songpath
    '§_«h
    Else
        '¦pªG¥Ø«e­µ¼Ö¥¿¦b¼·©ñ¤¤
        If objwmplayer.PlayState = 2 Then
            '°±¤î¼½©ñ­µ¼Ö
            objwmplayer.stop
        End If
    End If
End Sub

'ÀÉ®×Ãö³¬®É
Private Sub auto_close()
    '¦pªG§A¦³§ïÅܵ{¦¡½X objwmplayer ÅܼƷ|³Q­«³]
    '©³¤U³o¤@­Ó if §PÂ_¥Øªº¦b©óÁקK©óÃö³¬Àɮ׮ɵo¥Í¿ù»~
    If Not objwmplayer Is Nothing Then
        '¦pªG­µ¼Ö¥¿¦b¼½©ñ¤¤
        If objwmplayer.PlayState = 2 Then
            '°±¤î¼½©ñ­µ¼Ö
            objwmplayer.stop
        End If
    End If
    'ÄÀ©ñª«¥óÅÜ¼Æ objwmplayer
    Set objwmplayer = Nothing
End Sub

'Àɮ׶}±Ò®É
Private Sub auto_open()
    '«Ø¥ß MediaPlayer ª«¥ó
    Set objwmplayer = CreateObject("MediaPlayer.MediaPlayer")
End Sub
1.jpg

¦^´_  wengin66
¦b¼Ò²Õ¤W­±¦³¤@­ÓMicrosoft Excel ª«¥ó¡A¸ÌÀY¦³¤@­Ósheet1¡A§AÂI¥¦´N·|¬Ý¨ì±ø¥ó³]©wªºµ{¦¡ ...
zyzzyva µoªí©ó 2016-9-4 20:53


·PÁ¤j¤j«ü¾É

TOP

¦^´_ 3# wengin66
¦b¼Ò²Õ¤W­±¦³¤@­ÓMicrosoft Excel ª«¥ó¡A¸ÌÀY¦³¤@­Ósheet1¡A§AÂI¥¦´N·|¬Ý¨ì±ø¥ó³]©wªºµ{¦¡½X¡C

TOP

¥»©«³Ì«á¥Ñ wengin66 ©ó 2016-9-4 19:09 ½s¿è

¦³Án­µ.zip (10.37 KB) ¦^´_ 2# zyzzyva
½Ð°Ý¤j¤j¡AÀɮ׸̭±¥u¦³³o¨Ç­C!

TOP

¦^´_ 1# wengin66
³o¸Ì¨S¬Ý¨ì±ø¥óªº³]©w¡A±qµù¸Ñ¬Ý¥i¯à¬O¦bsheet1_change¸Ì¡C

TOP

        ÀR«ä¦Û¦b : ¯¸¦b¥b¸ô¡A¤ñ¨«¨ì¥Ø¼Ð§ó¨¯­W¡C
ªð¦^¦Cªí ¤W¤@¥DÃD