Read current audio volume setting

Ruddles

Well-known Member
Joined
Aug 24, 2010
Messages
5,851
Office Version
  1. 365
Platform
  1. Windows
Hi Everyone,

I know how to change the audio volume level setting using VBA by sending the VK_VOLUME_UP and VK_VOLUME_DOWN codes to the virtual keyboard, but my code also needs to know what the actual level is.

I've been trying to persuade The Google to tell me but haven't even got as far as having some code to try out. I guess if I could find out where the audio volume level setting is stored in the Windows 11 Registry, that would be a good start... but no joy so far.

Does anyone know how read the audio volume level setting? Or just point me to the place in the Registry where it's stored?

Thanks in advance,
R.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Upvote 0
Funnily enough, I just posted some code 2 days ago which among other things, allows for reading the volume level of the default system audio.

Check out this link:

The CAudio class offers this GetVol Method that returns the audio volume level in the range from 0.0 and 1.0... Multiply it by 100 to get the audio volume displayed in the UI.
 
Upvote 0
Solution

Forum statistics

Threads
1,223,887
Messages
6,175,199
Members
452,617
Latest member
Narendra Babu D

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top