- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¥»©«³Ì«á¥Ñ c_c_lai ©ó 2013-6-15 07:54 ½s¿è
¦^´_ 1# lin_6219
¬Ý¤F§A¼Æ¤éªº°Q½×¦¨ªG¡AÁÙ¬Oµ¹§AÓ´£¥Ü§a¡An¥[ªoËç¡I
«ä¦Ò°ÝÃDn¦h¤èªºÅçÃÒ¤ÎÆ[¹î¡A¥H´Á¯à¤Á¤J¨ì¯u¥¿ªº°ÝÃD®Ö¤ß¡C
IJµo°õ¦æµe°ÊºAªº¹Ïªí¡G- Option Explicit
- Dim timerEnabled As Boolean ' §P©w¶}±Ò¥»¤u§@ªí³æªº®É¬q¬O§_¬°¶}½L«e±Ò°Ê¡C
- Private Sub Workbook_Open()
- KChartWithVolume ' ¥H§A¦Û¤vªº K ¹Ï°µ¬°¨ÒÃÒ
- ' ¨C³{¬P´Á¤»¡B¤é °£¥~¡A ¦Û°Ê±Ò°Êp®É¾¹
- If Weekday(Date, 2) <= 5 Then Call timerStart
- End Sub
- Private Sub Workbook_BeforeClose(Cancel As Boolean)
- On Error Resume Next
- Application.OnTime Now + TimeValue("00:00:01"), "ThisWorkbook.inProcess", , False
- Me.Save
- End Sub
- Sub timerStart()
- If timerEnabled Then
- ' ²Ä¤G¦¸(§t)¥H«á§¡¥H³]©w¤§ "¶¡¹j®É¬q" ¨Ó³B²z°õ¦æ§Çªº§@·~¡C (¥»¨Ò¥H¨C¤¤ÀÄÁ°õ¦æ¤@¦¸)
- Application.OnTime (Now + TimeValue("00:05:00")), "ThisWorkbook.inProcess"
- Else
- timerEnabled = True
-
- If (TimeValue(Now) <= TimeValue("08:45:00")) Then
- Application.OnTime (TimeValue("08:45:00")), "ThisWorkbook.inProcess"
- Else
- ' ¨t²Îè³s¤W DDE ¦Ü¸ê®Æ¶×¤JExcel¤u§@ªí³æ¡A¶·¦³¤@Ó½w½Ä®É¬q¡A
- ' ³o®É¦pªG°¨¤W¥h§ì¨úDDE¸ê®Æ¡A·|¦³«¬ºA¤£²Åªº¿ù»~°T®§²£¥Í¡A¨Ã¤¤Â_°õ¦æ§Çªº§@·~¡C
- Application.OnTime (Now + TimeValue("00:00:05")), "ThisWorkbook.inProcess"
- End If
- End If
- End Sub
- Private Sub inProcess()
- On Error Resume Next
- If (TimeValue(Now) < TimeValue("08:45:00") Or TimeValue(Now) > TimeValue("13:46:01")) Then Exit Sub
-
- ' ½L¤¤³B²z¡A±N¸ê®Æ¶×¤J¼g¤J¤u§@ªí³æ¤ºÀx¦s¡C
- With Sheets("¥Dµe±")
- ' . . . . .
- ' . . . . . (¼g¤JDDE¶×¤J¤§¬ÛÃö¸ê®Æ))
- ' . . . . .
- End With
-
- Call getKLastMove() ' IJµo°õ¦æµe°ÊºAªº¹Ïªí
- Call timerStart
- End Sub
- Sub getKLastMove()
- Dim totalRows As Long
-
- With Worksheets("¥Dµe±")
- .Select
- totalRows = Worksheets("ø¹Ï¸ê®Æ").Range("A" & .Rows.Count).End(xlUp).Row
- ActiveSheet.ChartObjects.Select
- With ActiveChart
- .SetSourceData Source:=Range("ø¹Ï¸ê®Æ!$A$2:ø¹Ï¸ê®Æ!$E$" & CStr(totalRows) & ", ø¹Ï¸ê®Æ!$G$2:ø¹Ï¸ê®Æ!$G$" & CStr(totalRows) & _
- ", ø¹Ï¸ê®Æ!$F$2:ø¹Ï¸ê®Æ!$F$" & CStr(totalRows))
- .SeriesCollection(1).Name = "=ø¹Ï¸ê®Æ!$B$1" ' ¶}½L»ù
- .SeriesCollection(2).Name = "=ø¹Ï¸ê®Æ!$C$1" ' ³Ì°ª»ù
- .SeriesCollection(3).Name = "=ø¹Ï¸ê®Æ!$D$1" ' ³Ì§C»ù
- .SeriesCollection(4).Name = "=ø¹Ï¸ê®Æ!$E$1" ' ¦¬½L»ù (¦¨¥æ»ù)
- .SeriesCollection(5).Name = "=ø¹Ï¸ê®Æ!$G$1" ' ²¾°Ê¥§¡½u
- .SeriesCollection(5).Name = "¦¨¥æ¶q" ' ¦¨¥æª÷ÃB
- End With
- End With
- End Sub
- Sub KChartWithVolume() ' K½u¹Ï»P¦¨¥æ¶q¹Ï©ñ¦b¦P¤@¹Ïªí
- ' . . . . .
- ' . . . . . (K½u¹Ï»P¦¨¥æ¶q¹Ï)
- ' . . . . .
- End Sub
½Æ»s¥N½X ¦h¸ò¾Ç®Õ±Ð±Â¤Î¦P¾Ç̬ۤ¬½Ð¯q¡C |
|