December 12, 2016
I tried to write a procedure to update a chart source data specifying the correspondent worksheet as follows:
Sub ChartSource()
'
Dim ws As String
ws = ActiveSheet.Range("B16").Value
ActiveSheet.ChartObjects("Chart 5").Activate
ActiveChart.PlotArea.Select
ActiveChart.SetSourceData Source:=Sheets(ws).Range("A165:B365")
End Sub
Thanks in advance to guide me to fix the error "subscript out of range".
Power Query
Power Pivot
Xtreme Pivot Tables
Excel for Decision Making
Excel for Finance
Excel Analysis Toolpak
Power BI
Excel
Word
Outlook
Excel Expert
Excel Customer Service
November 8, 2013
December 12, 2016
Hi Catalin,
My value of B16 comes from a data validation referring to a previous list I didn't update. Thanks for your highlight. Take the chance could you please help me on another little problem:
I've changed the font size of the code on VBE through Tools > Options > Editor Format but failed to save it even after pressing the "OK" button. Why?
Sorry for bothering you so much!
Best regards,
Julian
Power Query
Power Pivot
Xtreme Pivot Tables
Excel for Decision Making
Excel for Finance
Excel Analysis Toolpak
Power BI
Excel
Word
Outlook
Excel Expert
Excel Customer Service
November 8, 2013
December 12, 2016
It seems a little tricky. The left side list is for code colors selection only not valid on font size. Although there are so many font types with limited size can be choosed from the right side drop down list but no English or U.S.A version found. That's my finding. Finally I choose Verdana (West Europe) to enhance my visibility.