No error occurs, but, if the sound has been muted before the form is opened, then the toggle enables the sound, and the beep is heard.
(sorry for my approximate english)
altogether, I prefer use VolDown, this way
Dim i As Integer
For i = 1 To 100
Call VolDown
Next i
and the sounds is shut down when the form opens
And I use VolUp the same way, when the form closes
To be honest, with VolDown and VolUp, beep sounds on the top of the form - each time I scroll on the top.
I must use VolMute as it was said by isladogs to be good !
I'm so happy to have found this ! I was feeling alone with that issue, nobody tells about it in french.
Thanks to isladogs, it works perfectly : no beep more and I still hear music on my computer !