View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default API commands to turn volume control on

This toggles the mute control



On Error Resume Next
Set oShell = AppActivate("Volume control")
If oShell Is Nothing Then
Set oShell = CreateObject("WScript.Shell")
End If
oShell.run"Sndvol32"
WScript.Sleep 1500
oShell.SendKeys"{TAB 2} "


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Mike" wrote in message
...
Thanks in advance for your help.

Does anyone have some VBA code that will unmute the sound
for the Windows Volume control using Excel?

I read some stuff in Walkenbach's book about displaying
stuff from the Control Panel within Excel using windows
API calls but I didn't see anything about changing the
volume settings. Thanks again.