2015-10-10 46 views
0

這裏是我的代碼:如何添加內存中的號碼和單元格值

Dim i As Integer 
For i = 1 To 116 

    ActiveChart.FullSeriesCollection(i).Select 
    With Selection.Format.Line 
     .Visible = msoTrue 
     .Weight = "=R!$B$" & CStr(i + 1) + 0.75 
    End With 

    Next i 
End Sub 

我想有這種自動邊框分配給一個圖表系列取決於相應的單元格的值。

回答

3

您需要從單元中獲取值爲Range object

.Weight = sheets("R").Range("B" & CLng(i + 1)).value + 0.75 
相關問題