This Blog

Syndication

Search

Tags

News

Community

Email Notifications

Archives

Grupos de Usuários

Blogs MVPs Brasil

Sites

Música de fundo no Excel

Hoje estava trabalhando em uma planilha e pensando: Bem que podia haver uma macro aqui para ouvir músicas...

Bem, fazer o que né? Criá-la!

Declare Function sndPlaySound32 Lib "winmm.dll" _
    Alias "sndPlaySoundA" (ByVal lpszSoundName _
    As String, ByVal uFlags As Long) As Long

Sub SoundStart()
   Dim intCounter As Integer
   Application.EnableCancelKey = xlErrorHandler
   For intCounter = 1 To 10
      Call sndPlaySound32("C:\WINDOWS\Media\tada.wav", 1)
      Application.Wait Now + TimeSerial(0, 0, 2)
   Next intCounter
ERRORHANDLER:
End Sub

Published Thu, Jun 30 2011 15:34 by paleo
Filed under: