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

½Ð°Ý¦³¿ìªk¥ÎVBA§¹¦¨¤U¦C¦Û°Êµe¹Ï¶Ü

½Ð°Ý¦³¿ìªk¥ÎVBA§¹¦¨¤U¦C¦Û°Êµe¹Ï¶Ü

a1,a2,a3......¨ì.A15¬O¦WºÙ±i¤T,§õ¥|µ¥µ¥
¯à§_¥ÎVBA¦Û°ÊµeB1¨ìG1µM«á¹Ïªí¦W¦Û°Ê§ïA1ªº¦WºÙ
                                   b2¨ìG2µM«á¹Ïªí¦W¦Û°Ê§ïA2ªº¦WºÙ
                                    b3¨ìG3µM«á¹Ïªí¦W¦Û°Ê§ïA3ªº¦WºÙ
                                     .
                                     .
                   ¤@ª½¨ìb15¨ìG15µM«á¹Ïªí¦W¦Û°Ê§ïA15ªº¦WºÙ
¥i¥H¶ÜÁÂÁÂ

§Ñ°O»¡¤F§Ú­n¥Îµe¹Ï¤¤ªº§é½u°µ¹Ïªí

TOP

½Ð°Ý¦³¨S¦³°ª¤â
¥i¥HÀ°§Ú¦Û°Ê©R¦W¹Ïªí­n«ç§ï§Ú­nA3¨ìA7Äæ°µ¹Ïªí¦WºÙ

Sub G¦Û°Êµe()

SaveTrans ("C3:FI3")
SaveTrans ("C4:FI4")
SaveTrans ("C5:FI5")
SaveTrans ("C6:FI6")
SaveTrans ("C7:FI7")

End Sub

Sub SaveTrans(stockNo As String)
    Sheets("Sheet1").Select
    Range(stockNo).Select

    Charts.Add
    ActiveChart.ChartType = xlLine
    ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range(stockNo), PlotBy _
        :=xlRows
    ActiveChart.Location Where:=xlLocationAsNewSheet
    With ActiveChart
        .HasTitle = False
        .Axes(xlCategory, xlPrimary).HasTitle = False
        .Axes(xlValue, xlPrimary).HasTitle = False
    End With
   
End Sub

TOP

¦^´_ 3# xu123


   «ü©w¦U¹Ïªíªº¦WºÙ
With ActiveChart.ChartTitle.Select
          Selection.Text = "='Sheet1'!R1C3"
End With
boyao

TOP

boyao ¤j

¤£¦n·N«ä§Ú§Ë¦n¤[¤£¦æ£z·|¥X¿ù
§Ú­n§âA¦Cªº¤­­ÓÄæ¦ì
¤À§O°µ¦¨¤­­Ó¹Ïªíªº¦WºÙ
­n«ç§ï£z

TOP

§Ú­n§âA3¨ìA7Äæ¦ì¸Ìªº¦WºÙ
¦Û°Ê°µ¦¨¤­­Ó¹Ïªí¨Ì§Ç
ªº¦WºÙ
­n«ç§ï£z

TOP

  1. Sub SaveTrans(namePos As String, stockNo As String)
  2.     Dim ws As Worksheet
  3.    
  4.     Set ws = ActiveSheet    'ActiveSheet¬°¸ê®Æ¨Ó·½¤u§@ªí
  5.     With Charts.Add
  6.         .Name = ws.Range(namePos).Value
  7.         .SetSourceData Source:=ws.Range(stockNo), PlotBy:=xlRows
  8.         .ChartType = xlLine
  9.         .Location where:=xlLocationAsNewSheet   'ActiveSheet ·|Åܬ°¸Ó¹Ïªí¤u§@ªí
  10.         .HasTitle = False
  11.         .Axes(xlCategory, xlPrimary).HasTitle = False
  12.         .Axes(xlValue, xlPrimary).HasTitle = False
  13.     End With
  14.    
  15.     ws.Activate    'ActiveSheetÁ٭쬰¸ê®Æ¨Ó·½¤u§@ªí, ¤~¯à³sÄò©I¥s
  16.     Set ws = Nothing
  17. End Sub
  18. Sub G¦Û°Êµe()
  19.     SaveTrans "A3", "C3:FI3"
  20.     SaveTrans "A4", "C3:FI4"
  21.     SaveTrans "A5", "C3:FI5"
  22.     SaveTrans "A6", "C3:FI6"
  23.     SaveTrans "A7", "C3:FI7"
  24. End Sub
½Æ»s¥N½X
¦^´_ 3# xu123

TOP

stillfish00¤j¤j
¥i¥H¤F«D±`·PÁ§A
«Ü¦n¥Î

TOP

        ÀR«ä¦Û¦b : ¥Í®ð¡A´N¬O®³§O¤Hªº¹L¿ù¨ÓÃg»@¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD