Excel Problem

  originalmiscellany 12:21 21 Oct 2004
Locked
  Graham ® 12:50 21 Oct 2004

Insert, Object.

  originalmiscellany 14:27 21 Oct 2004

but how do i get it to play at the end of the time, e.g. once 5 minutes has been counted down?
Thanks

  cherria 14:41 21 Oct 2004

How is your timer working, is it written in VB?

  cherria 14:41 21 Oct 2004

How is your timer working, is it written in VB?

  cherria 14:57 21 Oct 2004

In VB, the command you need to play an embedded sound object is:

ActiveSheet.Shapes("Object 2").Select
Selection.Verb Verb:=xlPrimary

Where "Object 2" was the name of the object on my workbook but where you would have to replace this with the name of the object on your sheet.

If you can't find out the name of the sound object, record a macro where you select it and play it, then take the name from the recorded macro.

  VoG II 16:17 21 Oct 2004

Declare Function PlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal wavFile As String, ByVal lNum As Long) As Long

Sub Drain()

Call PlaySound("sinkdr.wav", 0) 'assumes WAV file is in the same folder

End Sub

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Alienware 17 R4 2017 review

These brilliant Lego posters show just what children's imaginations are capable of

Mac power user tips and hidden tricks

Comment réinitialiser votre PC, ordinateur portable ou tablette Windows ?