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

[µo°Ý] ½Ð°Ý¸Ó¦p¦ó¥ÎVBA¦Û°Ê¤Æ¥XªÑ²¼K½u¹Ï©O¡H

¦^´_ 4# j1221


    k½u¹Ï¸ê®Æ¥²»Ý¨Ì§Ç±Æ¦C
§A­Yª½±µ¥Î©Ò¦³Äæ¦ìª½±µ»s¹Ï·|¥H¹w³]ªºª½½Õ¹Ï§e²{
­Yª½±µÂà´«Ãþ«¬¡AEXCEL¤]·|¥X²{ĵ§iµøµ¡¡A­n¨DÅܧó¸ê®Æ½d³ò
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

·P¿EHsiehªO¥D¡A¨ü±Ð¤F....

¦ý¥i§_½Ð°Ý±z¡A¬°¦ó­n¡u¥ý§ïÅܸê®Æ¼Æ¦C¦A³]©w¹ÏªíÃþ«¬¡v¤~¹ï©O¡H

¦A¦¸·PÁÂ
§Ú·R³Â»¶®a±Ú°Q½×°Ï¡I¡I

TOP

¦^´_ 1# j1221
¥ý§ïÅܸê®Æ¼Æ¦C¦A³]©w¹ÏªíÃþ«¬
  1. Sub Macro1()
  2. '
  3. ' Macro1 Macro
  4. ' Shih-Hao ¦b 2011/1/16 ¿ý»sªº¥¨¶°
  5. '

  6. '
  7.     Charts.Add
  8.     'ActiveChart.ChartType = xlStockOHLC  '¨ú®ø³o¦æ

  9.     ActiveChart.SetSourceData Source:=Sheets("76C").Range("A1:N22"), PlotBy:= _
  10.         xlColumns
  11.     ActiveChart.SeriesCollection(5).Delete
  12.     ActiveChart.SeriesCollection(5).Delete
  13.     ActiveChart.SeriesCollection(5).Delete
  14.     ActiveChart.SeriesCollection(5).Delete
  15.     ActiveChart.SeriesCollection(5).Delete
  16.     ActiveChart.SeriesCollection(1).XValues = "='76C'!R2C1:R22C1"
  17.     ActiveChart.SeriesCollection(2).XValues = "='76C'!R2C1:R22C1"
  18.     ActiveChart.SeriesCollection(3).XValues = "='76C'!R2C1:R22C1"
  19.     ActiveChart.SeriesCollection(4).XValues = "='76C'!R2C1:R22C1"
  20.     ActiveChart.Location Where:=xlLocationAsObject, Name:="76C"
  21.     With ActiveChart
  22.         .HasTitle = False
  23.         .Axes(xlCategory, xlPrimary).HasTitle = False
  24.         .Axes(xlValue, xlPrimary).HasTitle = False
  25.         .ChartType = xlStockOHLC   '³o¸Ì¤~§ïÅÜÃþ«¬
  26.     End With
  27.     ActiveChart.HasLegend = False
  28.     Windows("test1.xls").SmallScroll Down:=7
  29.     ActiveSheet.Shapes(1).IncrementLeft -168.75
  30.     ActiveSheet.Shapes(1).IncrementTop 269.25
  31.     Windows("test1.xls").SmallScroll Down:=6
  32.     ActiveSheet.Shapes(1).ScaleWidth 1.53, msoFalse, msoScaleFromTopLeft
  33.     ActiveSheet.Shapes(1).ScaleHeight 1.36, msoFalse, msoScaleFromTopLeft
  34.     ActiveChart.PlotArea.Select
  35.     With Selection.Border
  36.         .ColorIndex = 16
  37.         .Weight = xlThin
  38.         .LineStyle = xlContinuous
  39.     End With
  40.     With Selection.Interior
  41.         .ColorIndex = 2
  42.         .PatternColorIndex = 1
  43.         .Pattern = xlSolid
  44.     End With
  45.     With Selection.Border
  46.         .ColorIndex = 16
  47.         .Weight = xlThin
  48.         .LineStyle = xlContinuous
  49.     End With
  50.     With Selection.Interior
  51.         .ColorIndex = 40
  52.         .PatternColorIndex = 1
  53.         .Pattern = xlSolid
  54.     End With
  55.     ActiveChart.Axes(xlCategory).Select
  56.     Selection.TickLabels.NumberFormatLocal = "yyyy-mm-dd"

  57. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

Hello,

¦pªG¬O¦b¬¡­¶Ã¯¸Ìªº¸ê®Æ, «Øijª½±µ¨Ï¥Î¹Ïªíªº¤è¦¡Ã¸»s´N¥i¥H¤F.
³o¼Ë¤l¤ñ¸û²³æ§Ö³t.

TOP

        ÀR«ä¦Û¦b : ¤Ó¶§¥ú¤j¡B¤÷¥À®¦¤j¡B§g¤l¶q¤j¡A¤p¤H®ð¤j¡C
ªð¦^¦Cªí ¤W¤@¥DÃD