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

[µo°Ý] Ãö©óUserForm ¤¤ª«¥óChartSpaceªº¥Îªk½Ð±Ð

[µo°Ý] Ãö©óUserForm ¤¤ª«¥óChartSpaceªº¥Îªk½Ð±Ð

¦U¦ì«e½ú­Ì

³Ìªñ¤@¦b¬ã¨s¦p¦ó¦bUserForm ¤¤¨Ï¥Î ChartSpace (Microfost Office Web Companents 11.0)
¦ý¬O§ÚµLªk±N4²Õ¸ê®Æ©ñ¦b¦P¤@­Óªí®æ¤W!
§Ú¦³ª¦¹L»D¤F(³o¸Ì)¦ý¬OÁÙ¬O¦³°ÝÃD
Google ¤]§ä¤£¨ì¬ÛÃöªº¸ê®Æ¡A³sChartSpace ªº¥Îªk¤]·d¤£¤Ó²M·¡:'(
ªþ¤WÀÉ®×»Pµ{¦¡¡A§Æ±æ¤j®aÀ°À°§Ú
§Ú¥Îªº¬Ooffice2007
  1. Private Sub UserForm_Initialize()
  2. Dim m As Integer, i As Integer
  3. Dim chc
  4. Dim chtnewchart
  5. m = 12
  6. ReDim Ascategories(m), Aivalues(m), Aivalues2(m)
  7. ChartSpace1.Clear
  8. For y = 1 To 2
  9. For i = 1 To m
  10.     Ascategories(i) = ThisWorkbook.Sheets(1).Cells(i + 1, 1)
  11.     Aivalues(i) = ThisWorkbook.Sheets(1).Cells(i + 1, 1 + y)
  12. Next i

  13.     Set chc = ChartSpace1.Constants
  14.     Set chtnewchart = ChartSpace1.Charts.Add
  15.     chtnewchart.Type = chc.chChartTypeLineMarkers
  16.     With chtnewchart
  17.     .SetData chc.chDimSeriesNames, chc.chDataLiteral
  18.     .SetData chc.chDimCategories, chc.chDataLiteral, Ascategories
  19.     .SeriesCollection(0).SetData chc.chDimValues, chc.chDataLiteral, Aivalues
  20.     End With

  21. Next y
  22. With ChartSpace1

  23. .HasChartSpaceTitle = True
  24. .ChartSpaceTitle.Caption = "Family"
  25. .ChartSpaceTitle.Font.Size = 25

  26. End With

  27. End Sub
½Æ»s¥N½X
Book1.rar (18.08 KB)

For y = 1 To 4

TOP

oobrid ¤j¤j
§Úª¾¹D for Y = 1 to 4
¦ý¬Orun §¹«á·|¦bChartSpaceª«¥ó¤¤²£¥Í4­Ó¤p"¦±½u¹Ï"¡A¦Ó¤£¬O¦X¦Ó¬°¤@
§A¥i¯à­n°õ¦æ§ÚªþªºÀɮפ~·|¤F¸Ñ

TOP

        ÀR«ä¦Û¦b : «Î¼e¤£¦p¤ß¼e¡C
ªð¦^¦Cªí ¤W¤@¥DÃD