Possible to read a Bar Chart Bar "Width" in VBA?

NigelTufnel

Board Regular
Joined
Apr 3, 2008
Messages
53
Office Version
  1. 365
Platform
  1. Windows
Short question: Is it possible to read the width of a single bar in a Bar Chart using VBA?

Here's the application: I'm creating a series of bar charts that have a varying number of categories and series. However, if possible, I'd like to impose a uniform width for the bars in the charts. It's OK if the charts are different overall sizes, it would just look better if all the bars within the charts were uniform.

I know I can change the bar sizes by manipulating the "Gap width"--but this adds space between the categories, and I don't want that.

So, instead, I'd like the re-size the plot areas so that the the bars (and spaces between the categories) stay the same. I can do this manually, but I might be able to automate this if I could somehow read the original bar widths and if I knew the desired bar width.

Any thoughts/comments?
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,224,550
Messages
6,179,462
Members
452,915
Latest member
hannnahheileen

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