ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ­W´o... µæ³¾EXCEL VBA ¨D§U

[µo°Ý] ­W´o... µæ³¾EXCEL VBA ¨D§U

À³¸Ó¬O­Ó²³æªºµ{§Ç¦ý¸£´Ý°_¨Ó´N¬O·Q¤£³q...
¤w¸g¸Õ¹L¦n¦h¤£¦P¤è¦¡¦ý³£¤£¦æ©Ò¥H·Qݯ®v¥S®v©j¨D±Ï ><><><

¥H¤U¬O¤p©fPLOT GRAPH ®É¥ÎªºCODE...
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

ThisWorkbook.Sheets(stockno).Shapes.AddChart.Select
ThisWorkbook.Sheets(stockno).Shapes.AddChart.Chart.ChartType = xlLine
ThisWorkbook.Sheets(stockno).Shapes.AddChart.Chart.SetSourceData Source:=Range(stockno & "$A$2A" & row, stockno & "$H$2H$" & row)

¨ìSET RANGE®ÉÁ`·|¦³BUG... ¦ý¤S§ï¤£¦^¨Ó
·|¤£·|¬O ! ªº¦ì¸m¿ù¤F¥§...? À³¸Ó«ç¼Ë¸Ñ¨M?? ¨D±Ï >< ><

¦^´_ 1# sandy0107

¸Õ¸Õ³o¼Ë?
  1. Dim SMA_day As Integer
  2. Dim stockno As String
  3. Dim row As string

  4. stockno = CStr(ThisWorkbook.Sheets("control").Cells(6, "K").Value)
  5. SMA_day = CInt(ThisWorkbook.Sheets("control").Cells(5, "K").Value)
  6. row = trim(str(SMA_day + 1))

  7. ThisWorkbook.Sheets(stockno).Shapes.AddChart.Select
  8. ThisWorkbook.Sheets(stockno).Shapes.AddChart.Chart.ChartType = xlLine
  9. ThisWorkbook.Sheets(stockno).Shapes.AddChart.Chart.SetSourceData Source:=Range(stockno & "$A$2:$A$" & row, stockno & "$H$2:$H$" & row)
  10.    
½Æ»s¥N½X
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

¤µ¤éの¤@¬íは  ©ú¤éにない
http://kimbalko-chi.blogspot.com
http://kimbalko.blogspot.com

TOP

¦^´_ 2# kimbal

°ª¤H½Ð°Ý¥i§_À°§Ú¸Ñ¨M§Ú¤U­±linkªº°ÝÃD¡HÁÂÁÂ~
    http://forum.twbts.com/thread-8403-1-1.html

TOP

¥»©«³Ì«á¥Ñ stillfish00 ©ó 2012-12-2 11:00 ½s¿è

¦^´_ 1# sandy0107
§Aªº³o¬qµ{¦¡©ñ¦b­þ?
¦pªG©ñ¦b¼Ò²Õ©Î¨ä¥L¤u§@ªí¤º
ThisWorkbook.Sheets(stockno).Shapes.AddChart.Chart.SetSourceData Source:=Range(stockno & "$A$2A" & row, stockno & "$H$2H$" & row)
Range«e­±°O±o«ü©w­þ­Ósheet

©ÎªÌªþ¤WÀɮ׬ݬÝ

TOP

¦^´_ 2# kimbal

¦^´_¤F¤]¤£¦æ©O >< ><
¥i¯à¬O°¸ªí¹F¤£¦n... §â­ìÀɶK¤W¨Ó½Ð±Ð¤j®a ><
http://dl.dropbox.com/u/84304423/ShareAnalyzer%201.xlsm

TOP

¦^´_ 4# stillfish00


¬Ý¤£¤ÓÀ´... @@
ªþ¤W­ìÀɦb³o¸Ì
http://dl.dropbox.com/u/84304423/ShareAnalyzer%201.xlsm
·PÁÂÀ°¦£ ><

TOP

¦^´_ 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

TOP

¦^´_ 7# stillfish00


¥X¨Ó¤F¥X¨Ó¤F !!
ÁÂÁ³á !!^3^

TOP

        ÀR«ä¦Û¦b : ª¾ÃÑ­n¥Î¤ßÅé·|¡A¤~¯àÅܦ¨¦Û¤vªº´¼¼z¡C
ªð¦^¦Cªí ¤W¤@¥DÃD