Issue
I was searching for how to change decimal, using VBA and I found the excellent answer below.
https://stackoverflow.com/a/32462504/9653254
However, for my graph, it is a scatter graph. So I need to change decimal on x-axis. Above code only change y-axis. Could you let me know how to change deciaml on x-axis?
Thank you in advance.
Dim obj As Object
For Each obj In ActiveSheet.ChartObjects
With obj.Chart.Axes(xlValue)
.TickLabels.NumberFormat = "0.00"
End With
Next obj
End Sub
Solution
I found answer, thanks to @Ahmed AU
The code is the below. Thank you for your comment.
Sub xydecimal()
Dim obj As Object
For Each obj In ActiveSheet.ChartObjects
With obj.Chart.Axes(xlValue)
.TickLabels.NumberFormat = "0.00"
End With
With obj.Chart.Axes(xlCategory)
.TickLabels.NumberFormat = "0.00"
End With
Next obj
End Sub
Answered By - Jin.W.Kim Answer Checked By - Robin (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.