how to decode a vba code
Option Explicit
Dim wbk As Workbook
Dim CompanyO As Worksheet
Dim cht As ChartObject
Sub UpdateCht()
Set wbk = ThisWorkbook
Set CompanyO = wbk.ActiveSheet
Set cht = CompanyO.ChartObjects("Chart 6")
With cht
If CompanyO.Range("J13").Value = CompanyO.Range("Company_Name").Value Then
.Chart.SeriesCollection(2).ChartType = xlColumnClustered
.Chart.SeriesCollection(1).AxisGroup = 2
.Chart.Refresh
Else
.Chart.SeriesCollection(2).ChartType = xlLine
.Chart.SeriesCollection(1).AxisGroup = 1
.Chart.Refresh
End If
End With
Application.ScreenUpdating = False
'CompanyO.Range("A1").Select
Application.ScreenUpdating = True
End Sub
Recent comments
5 years 42 weeks ago
6 years 28 weeks ago
6 years 40 weeks ago
6 years 42 weeks ago
6 years 43 weeks ago
6 years 49 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago