I have been using the following code to toggle some chart data labels on and off using a macro - the data labels show price and date data at certain points on a stock chart. The idea was you can show the price and date of BUY and SELL trades, or de-clutter the chart and turn them off.
Now this worked just fine on Excel 2010 and Excel 2007, but when running on Excel 2013 it throws up an error '400' in a message box.
Any ideas as to where I am going wrong? I noticed some odd differences with Office 2013, code that previously worked in 2010 didn't work in Office 2013, another one being cut and paste operations.
Dim lngSeries As Long
Dim xx As DataLabels
For lngSeries = 1 To 3
.HasDataLabels = Not .HasDataLabels
If .HasDataLabels Then
.ShowCategoryName = True
.ShowValue = True
.ShowSeriesName = True
Many thanks in advance for your help!