- ©«¤l
- 1018
- ¥DÃD
- 15
- ºëµØ
- 0
- ¿n¤À
- 1058
- ÂI¦W
- 0
- §@·~¨t²Î
- win7 32bit
- ³nÅ骩¥»
- Office 2016 64-bit
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2012-5-9
- ³Ì«áµn¿ý
- 2022-9-28
|
¦^´_ 6# sandy0107
§ï¦¨³o¼Ë¸Õ¸Õ
Public Sub plot_SMA()
Dim SMA_day As Integer
Dim stockno As String
Dim row As String
stockno = CStr(ThisWorkbook.Sheets("control").Cells(6, "K").Value)
SMA_day = CInt(ThisWorkbook.Sheets("control").Cells(5, "K").Value)
row = SMA_day + 1
With ThisWorkbook.Sheets(stockno).Shapes.AddChart
.Chart.ChartType = xlLine
.Chart.SetSourceData Source:=Range(stockno & "!$A$2:A" & row & ", " & stockno & "!$H$2:H$" & row)
End With
'activate stock sheet
ThisWorkbook.Worksheets(stockno).Activate
End Sub |
|