ramkumarcn
Board Regular
- Joined
- Jun 21, 2011
- Messages
- 114
Hi,
I am trying to write VBA to configure the min and max values of X-axis for any chart that accepts this configuration. This is because, min and max values of X-axis cannot be configured for all charts.
The below code sets the min and max values as expected. However, I would like the below code to be executed only when the charts are of type xlBarClustered, xlBarStacked, xlBarStacked100, xl3DBarClustered, xl3DBarStacked, xl3DBarStacked100, xlCylinderBarClustered, xlCylinderBarStacked, xlCylinderBarStacked100, xlConeBarClustered, xlConeBarStacked, xlConeBarStacked100, xlPyramidBarClustered, xlPyramidBarStacked, xlPyramidBarStacked100
With chName.Axes(xlCategory)
.MinimumScale = CtrlSheet.Range("C2").Value
.MaximumScale = CtrlSheet.Range("D2").Value
End With
Can you please help me with this?
Thanks,
Ram
I am trying to write VBA to configure the min and max values of X-axis for any chart that accepts this configuration. This is because, min and max values of X-axis cannot be configured for all charts.
The below code sets the min and max values as expected. However, I would like the below code to be executed only when the charts are of type xlBarClustered, xlBarStacked, xlBarStacked100, xl3DBarClustered, xl3DBarStacked, xl3DBarStacked100, xlCylinderBarClustered, xlCylinderBarStacked, xlCylinderBarStacked100, xlConeBarClustered, xlConeBarStacked, xlConeBarStacked100, xlPyramidBarClustered, xlPyramidBarStacked, xlPyramidBarStacked100
With chName.Axes(xlCategory)
.MinimumScale = CtrlSheet.Range("C2").Value
.MaximumScale = CtrlSheet.Range("D2").Value
End With
Can you please help me with this?
Thanks,
Ram