Board logo

¼ÐÃD: [µo°Ý] µLªk¨ú±o scatter plot ªºvalue [¥´¦L¥»­¶]

§@ªÌ: swatt    ®É¶¡: 2022-5-27 21:50     ¼ÐÃD: µLªk¨ú±o scatter plot ªºvalue

½Ð±Ð¦U¦ì¤j®v¡A
¥Ø«eªí®æ¤º¤w¸gµe¦n¤@­Ó scatter plot¡A
·Q¥Î¥H¤U»yªk­n¨ú±o scatter plot ªºvalue¡A«o¥X²{¿ù»~¡A
¥Îwatchµøµ¡¬d¬Ýcht.SeriesCollection(1).Values ¬O¦³­Èªº¡A¬°¦ódebug.print cht.SeriesCollection(1).Values(2) ³o¤@¥y·|¿ù»~?


Sub get_scatter_point_value()

    Dim cht As Chart, pt As Point

    Set cht = ActiveSheet.ChartObjects(1).Chart
   
    Debug.Print cht.SeriesCollection(1).Values(2)
   
End Sub
[attach]34948[/attach]
§@ªÌ: singo1232001    ®É¶¡: 2022-5-28 10:08

¦^´_ 1# swatt


    ¨ä¹ê¤£¤ÓÀ´­ì²z

¥Ø«e¦³­Ó¤èªk¯à®³¥X¨Ó
    ar = cht.SeriesCollection(1).Values
    Debug.Print ar(2)
§@ªÌ: swatt    ®É¶¡: 2022-5-28 13:26

¦^´_ 2# singo1232001

Hi singo1232001
³o½T¹ê¬O¤@­ÓÅܳqªº¤èªk¡A·PÁ§AªºÀ°¦£~
§@ªÌ: quickfixer    ®É¶¡: 2022-5-28 22:09

¥»©«³Ì«á¥Ñ quickfixer ©ó 2022-5-28 22:24 ½s¿è

§Ú¥H«e°Ý01ªºs¤j
¥L«Øij§Ú¦pªG¥u¬O¨ú³æÂI,¥i¥Î³o2ºØ¤è¦¡,§A°Ñ¦Ò¤@¤U
²Ä¤@ºØ,©ñ¦b§Aµ{¦¡½X¤º
WorksheetFunction.Index(cht.SeriesCollection(1).Values,¦ì¸m)
§Aªº´N¬O1~5
Debug.Print WorksheetFunction.Index(cht.SeriesCollection(1).Values,2)
¤£dim¡Bset,¥Î¤@¦æ
Debug.print WorksheetFunction.Index(ActiveSheet.ChartObjects(1).Chart.SeriesCollection(1).Values,1)

²Ä¤GºØ
Sub test()
    Dim cht As Series
    Set cht = ActiveSheet.ChartObjects(1).Chart.SeriesCollection(1)
    Debug.Print cht.Values(1)
End Sub
§@ªÌ: swatt    ®É¶¡: 2022-5-29 15:54

¦^´_ 4# quickfixer

Hi quickfixer,
ÁÂÁ§A´£¨Ñªº¿ìªk¡A¤S¾Ç¨ì¤F¤£¤Ö¡AVBAùØÀY¯uªº¦³¤£¤Öªº¬Ü¬Ü¨¤¨¤~




Åwªï¥úÁ{ ³Â»¶®a±Ú°Q½×ª©ª© (http://forum.twbts.com/)