Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    Terneuzen, Netherlands
    Posts
    895
    Thanks
    0
    Thanked 0 Times in 0 Posts

    WAV/MP3 from VBA? (Ex2003)

    I know how to play Wav/Mp3 from VBA in Excel: the music files have to be either external files or they must have been added as an object somewhere in a sheet. I'd like to know if I could add these somehow / somewhere in a VBA-Form and play them from there (reason: I like to have the sounds incorporated in my sheet so the sheet is 'stand-alone'; I also would like to 'hide' the sound... I found that to play them when they are added as objects, the sheet cannot be 'veryhidden').

    Ideas?

    EJ

    PS. It's GREAT to the the Lounge back online! I've REALLY missed all of you !

  2. #2
    New Lounger
    Join Date
    Jul 2002
    Location
    Auckland, New Zealand
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: WAV/MP3 from VBA? (Ex2003)

    try

    Sheet2.Shapes("Object 1").OLEFormat.Verb

    where "Object 1" is the name of the inserted Sound file
    and
    Sheet2 is your sheets CODE NAME, not the sheets tab name.

  3. #3
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    Terneuzen, Netherlands
    Posts
    895
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: WAV/MP3 from VBA? (Ex2003)

    Works! Thanks

  4. #4
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: WAV/MP3 from VBA? (Ex2003)

    Aha, and:

    Sheet2.Visible = xlVeryHidden

    Boy am I going to irritate some coworkers! <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15>
    Attached Files Attached Files
    -John ... I float in liquid gardens
    UTC -7ąDS

  5. #5
    New Lounger
    Join Date
    Jul 2002
    Location
    Auckland, New Zealand
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: WAV/MP3 from VBA? (Ex2003)

    That sound file will do it <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

Posting Permissions

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