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: 16
  • 2.png
    2.png
    76 KB · Views: 16

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Have a look at this thread:
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,901
Members
449,097
Latest member
dbomb1414

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