sounds


Posted by PHISHFN on July 12, 2001 6:54 AM

how do you assign a sound event to forms and controls on the forms? Like when you click close it plays a sound...



Posted by Joe Was on July 12, 2001 7:28 AM

Sub Button8_Click()
' This button go's to the top of the InPut sheet.
'
Dim n

With Assistant
.On = True
.Visible = True
If Not Sounds Then Sounds = True
.Animation = msoAnimationWritingNotingSomething
End With
Range("A2").Select
For n = 1 To 3
Beep
Next n
End Sub

This works with Excel 2000 and above. If you do not use the msoAnimation it may work in lower versions?

Not all of the code above is needed, I used a real macro to show how it is used. JSW