my chart disappear when I try to update my x-axis min and max scale

daniboymu

Board Regular
Joined
Nov 1, 2020
Messages
54
Office Version
  1. 2019
Platform
  1. Windows
I have a problem with my chart, when I update the period of the chart and updates the mininum and maximun X-axis scale my chart disappear, what can i do about that?
IF SOMEONE COULD FIX THE CODE PLEASE!

VBA Code:
Sub ESCALADA()

Dim name As String
  
Application.ScreenUpdating = False
  
ActiveSheet.ChartObjects("Gráfico 5").Activate
ActiveChart.Axes(xlCategory, 1).Select
    
With ActiveChart.Axes(xlCategory, 1)
'.Crosses = xlMinimum
.CategoryType = xlTimeScale
.MajorUnit = Range("J7").Value
'.BaseUnitIsAuto = True
.MinimumScale = Range("H7").Value
.MaximumScale = Range("I7").Value
.TickLabels.Orientation = 45
.ReversePlotOrder = True
Application.ScreenUpdating = True
End With
End Sub
 

Attachments

  • 1.png
    1.png
    136.1 KB · Views: 17
  • 2.png
    2.png
    76 KB · Views: 17

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Have a look at this thread:
 
Upvote 0

Forum statistics

Threads
1,216,750
Messages
6,132,498
Members
449,730
Latest member
SeanHT

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