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 36 weeks ago
6 years 22 weeks ago
6 years 34 weeks ago
6 years 37 weeks ago
6 years 38 weeks ago
6 years 43 weeks ago
6 years 52 weeks ago
7 years 2 days ago
7 years 3 days ago
7 years 3 days ago