Excel Problem

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

Insert, Object.

  originalmiscellany 14:27 21 Oct 04

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 04

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

  cherria 14:41 21 Oct 04

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

  cherria 14:57 21 Oct 04

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 04

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.

Huawei P10 review

1995-2015: How technology has changed the world in 20 years

An overview: What leading creative agencies are doing to improve diversity

New iPad, iPhone SE & Red iPhone 7 on sale now