+ Reply to Thread
Results 1 to 2 of 2

add music?

  1. #1
    Registered User
    Join Date
    02-14-2005
    Posts
    4

    add music?

    is there a way to have a WAV or MP3 file play upon the opening of a workbook? i'd like to spice up these sheets im sending via email. any ideas?

  2. #2
    Bob Phillips
    Guest

    Re: add music?

    Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" _
    (ByVal lpszName As String, _
    hModule As Long, _
    ByVal dwFlags As Long) As Long


    Private Sub Workbook_Open()
    PlayWavFile "C:\Windows\Media\Microsoft Office 2000\Chimes.wav"
    End Sub


    Public Function PlayWavFile(WavFile As String) As String
    Const SND_ASYNC = &H1
    Const SND_FILENAME = &H20000
    PlaySound WavFile, 0, SND_ASYNC Or SND_FILENAME
    PlayWavFile = ""
    End Function


    'This is workbook event code.
    'To input this code, right click on the Excel icon on the worksheet
    '(or next to the File menu if you maximise your workbooks),
    'select View Code from the menu, and paste the code



    --
    HTH

    Bob Phillips

    "butters14" <[email protected]> wrote
    in message news:[email protected]...
    >
    > is there a way to have a WAV or MP3 file play upon the opening of a
    > workbook? i'd like to spice up these sheets im sending via email. any
    > ideas?
    >
    >
    > --
    > butters14
    > ------------------------------------------------------------------------
    > butters14's Profile:

    http://www.excelforum.com/member.php...o&userid=19890
    > View this thread: http://www.excelforum.com/showthread...hreadid=469742
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1