- 帖子
- 6
- 主題
- 3
- 精華
- 0
- 積分
- 10
- 點名
- 0
- 作業系統
- Windows 7
- 軟體版本
- 1
- 閱讀權限
- 10
- 註冊時間
- 2013-5-2
- 最後登錄
- 2019-11-21

|
2#
發表於 2014-12-6 00:52
| 只看該作者
沒貼完整修正如下
Sub hihi()
Sheets("rawdata").Select
Cells(300, 1).End(xlUp).Select
endDD = Selection.Row
Cells(1, 1000).End(xlToLeft).Select
endRR = Selection.Column
For F = 6 To Sheets.Count
For K = 1 To endRR
Range(Cells(1, 1), Cells(2, K)).Select
'Range(Cells(1, k), Cells(2, k)).Select
ActiveSheet.Shapes.AddChart.Select '增加圖形
ActiveChart.ChartType = xlLineMarkers '圖形類型
ActiveChart.SetSourceData Source:=Sheets(F).Range(Cells(1, 1), Cells(2, K)) '資料範圍
ActiveChart.ApplyLayout (5) '圖表樣式
ActiveChart.ChartTitle.Select
Selection.delete
ActiveChart.Axes(xlValue).AxisTitle.Select
Selection.delete
Next
Next
End Su |
|