2014-10-20 58 views
0

我在Access 2010中構建了一些圖表並試圖自動化它們。 但我不能通過vba應用數據標籤。爲什麼圖表ApplyDataLabels在Access 2010中不起作用

當我嘗試使用ApplyDataLabels,我得到了錯誤438:

Dim mychart As Object 
Dim myseries As Object 
Dim ax As Object 
Dim pt As Object 

Set mychart = frm.ChartSpace.Charts(0) 

For Each myseries In mychart.SeriesCollection 
    myseries.ApplyDataLabels '438 - Object doesn't support this property or method 
Next 

什麼我需要做的,使datalabel可用?

提前致謝!

Fábio。

回答

0

我已經找到了解決辦法:

Dim dl as Object 
For Each myseries In mychart.SeriesCollection 
     Set dl = myseries.DataLabelsCollection.Add 
     dl.NumberFormat = "0.00" 
Next 
相關問題