- ©«¤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
|
¦^´_ 4# saleen
¬O¤£¬O©pªº»Ý¨D¡H
§Ú±N©pªºµ{¦¡½X¥[¤J¤F¸ê®Æ®y¼ÐÈȪº°ÊºA²§°Ê¡A
¥un¸ê®ÆÅÜ°Ê¡A¥¦©ó°õ¦æ upd() ®É·|¦P®É×¥¿¡C- Private Sub Workbook_Open()
- Call updateDate ' µ{¦¡¤@±Ò©l¡A«K¥h¦Û°Ê°õ¦æ updateDate
- newHour = Hour(Now())
- newMinute = Minute(Now())
- newSecond = Second(Now()) + 20
- waittime = TimeSerial(newHour, newMinute, newSecond)
- Application.Wait waittime ' µy«Ý 20 ¬í«á°õ¦æ upd()
- Call upd
- End Sub
- Private Sub Workbook_BeforeClose(Cancel As Boolean)
- Me.Save
- End Sub
- Sub updateDate()
- Dim Rng As Range
- With ¤u§@ªí1
- If .[A2] <> Date Then
- ' .Range("A2:H2").Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
- .Range("A2:H2").Insert Shift:=xlShiftDown
- .[A2] = Date
- End If
- End With
- End Sub
- Sub upd()
- Dim Rng As Range
-
- With ¤u§@ªí1
- Set Rng = .[B2].Resize(1, 5)
-
- If .[A2] = Date Then
- ' ¦]¬°ì«ü©wªº J44 ·|¦]¸ê®Æ¤§¦æ¼Æ¼W´î¦Ó¦³©ÒÅÜ°Ê¡C
- Rng(1) = "=XQNET|Quote!'TSEX5.TW-StockValueRatio'"
- Rng(2) = "=XQNET|Quote!'TSEX5.TW-PriceChangeRatio'"
- Rng(3) = "=XQNET|Quote!'TSEX8.TW-StockValueRatio'"
- Rng(4) = "=XQNET|Quote!'TSEX8.TW-PriceChangeRatio'"
- Rng(5) = "=100-B2-D2"
- Rng.Value = Rng.Value ' ±N¤½¦¡¥HÄæȨú¥N
- End If
- End With
-
- reDraw ' «·sø»s¹Ïªí®y¼ÐÈ
- End Sub
- Sub reDraw()
- Dim shp As Integer, EndKBarRow As Long
-
- With ¤u§@ªí1
- EndKBarRow = .Range("B" & Sheets("¤u§@ªí1").Rows.Count).End(xlUp).Row
- shp = 0
- For Each oShape In .Shapes
- If oShape.Type = 3 Then ' ¬J¦³ªº²Îp¹Ïªí
- oShape.Select
- shp = shp + 1
-
- With ActiveChart
- .SetSourceData Source:=IIf(shp = 1, Range("¤u§@ªí1!$A$1:¤u§@ªí1!$A$" & CStr(EndKBarRow) & ", ¤u§@ªí1!$B$1:¤u§@ªí1!$B$" & CStr(EndKBarRow)), _
- IIf(shp = 2, Range("¤u§@ªí1!$A$1:¤u§@ªí1!$A$" & CStr(EndKBarRow) & ", ¤u§@ªí1!$C$1:¤u§@ªí1!$C$" & CStr(EndKBarRow)), _
- IIf(shp = 3, Range("¤u§@ªí1!$A$1:¤u§@ªí1!$A$" & CStr(EndKBarRow) & ", ¤u§@ªí1!$D$1:¤u§@ªí1!$D$" & CStr(EndKBarRow)), _
- Range("¤u§@ªí1!$A$1:¤u§@ªí1!$A$" & CStr(EndKBarRow) & ", ¤u§@ªí1!$E$1:¤u§@ªí1!$E$" & CStr(EndKBarRow)))))
- With .Axes(xlCategory)
- .CategoryType = xlTimeScale
- .MajorUnit = 1
- .MajorUnitScale = xlDays
- .MinorUnit = 1
- .MinorUnitScale = xlDays
- End With
- End With
- End If
- Next
- .[A1].Select
- End With
- End Sub
½Æ»s¥N½X |
|