AndyAinscow
asked on
Chart on powerpoint slide - formatting changes after data is filled in.
On the attached image one sees that the top left chart has a 'standard' number format for the axis wheras the bottom right has a 'scientific' format.
Initially both charts had the 'standard' number format for the labels. After filling the dataset for the chart with VBA code running in Microsoft Access (no changes to formatting, only the numbers to be displayed) the one chart is OK but the other has been changed to 'scientific' format which is unwanted.
Why is this happening?
More important - how can I set the axis tick lables formatting back to 'standard' via VBA code?
Initially both charts had the 'standard' number format for the labels. After filling the dataset for the chart with VBA code running in Microsoft Access (no changes to formatting, only the numbers to be displayed) the one chart is OK but the other has been changed to 'scientific' format which is unwanted.
Why is this happening?
More important - how can I set the axis tick lables formatting back to 'standard' via VBA code?
No File
HI,
Maybe
ActiveChart.Axes(xlCategor y).TickLab els.Number Format = "0"
ActiveChart.Axes(xlValue). TickLabels .NumberFor mat = "0"
Regards
Maybe
ActiveChart.Axes(xlCategor
ActiveChart.Axes(xlValue).
Regards
ActiveChart.Axes(xlCategor y).TickLab els.Number Format = "0.0"
ActiveChart.Axes(xlValue). TickLabels .NumberFor mat = "0.0"
ActiveChart.Axes(xlValue).
ASKER
then try this format
"[>=1]0;[=0]0;0.######"
Regards
"[>=1]0;[=0]0;0.######"
Regards
ASKER
That cures that but then promptly brings another:
Where the axis now has two lables both of 2 with the custom format
What I want (which is how the empty chart is formatted) results in
using the 'standard' setting for the label format
For some reason this setting is being replaced on some, but not all, charts after I fill the values into the dataset.
Where the axis now has two lables both of 2 with the custom format
What I want (which is how the empty chart is formatted) results in
using the 'standard' setting for the label format
For some reason this setting is being replaced on some, but not all, charts after I fill the values into the dataset.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I'd tried 'Standard' before asking the question - it barfed. Now with 'General' it works perfectly.
Thanks.
Thanks.
General in English
ActiveChart.Axes(xlCategor y).TickLab els.Number FormatLoca l = "Standard"
ActiveChart.Axes(xlCategor
ASKER
Unfortunately Standard is also an English word with an similar meaning in this context. Anyway it works now. :-)