| ©«¤l5923 ¥DÃD13 ºëµØ1 ¿n¤À5986 ÂI¦W0  §@·~¨t²Îwin10 ³nÅ骩¥»Office 2010 ¾\ŪÅv150 ©Ê§O¨k ¨Ó¦Û¥xÆW°ò¶© µù¥U®É¶¡2010-5-1 ³Ì«áµn¿ý2022-1-23 
         
 | 
                
| ¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-4-19 12:31 ½s¿è 
 ¦^´_ 24# c_c_lai
 °ÝÃD¦b
 ActiveSheet.ChartObjects(oShape.Name).Activate
 ½Æ»s¥N½XSub getEndRows(sDraw As String)
    Dim oShape As Shape
    Dim numChart As Integer
    Dim totalRows As Single
    numChart = 0
    totalRows = Sheets("²Îp¹Ïªí").Range("B" & Rows.Count).End(xlUp).Row     ' ¶Ç¦^ B Äæ©Ò¨Ï¥ÎÀx¦s®æ¤§³Ì«á¤@®æ¤§¦C¸¹
    Sheets(sDraw).Select
    For Each oShape In ActiveSheet.Shapes
        If oShape.Type = 3 Then
            numChart = numChart + 1
            With ActiveSheet.ChartObjects(oShape.Name).Chart
                Select Case numChart
                    Case 1
                        .SetSourceData Source:=Range("²Îp¹Ïªí!$B$1:²Îp¹Ïªí!$B$" & totalRows & ", ²Îp¹Ïªí!$AA$1:²Îp¹Ïªí!$AA$" & totalRows) ' ¹Ï¥Ü·|¤À§OÅã¥Ü¥X ¥D¤O¬É¤J
                    Case 2
                        .SetSourceData Source:=Range("²Îp¹Ïªí!$B$1:²Îp¹Ïªí!$B$" & totalRows & ", ²Îp¹Ïªí!$AB$1:²Îp¹Ïªí!$AB$" & totalRows) ' ¹Ï¥Ü·|¤À§OÅã¥Ü¥X ¤O®t
                    Case 3
                        .SetSourceData Source:=Range("²Îp¹Ïªí!$B$1:²Îp¹Ïªí!$B$" & totalRows & ", ²Îp¹Ïªí!$AC$1:²Îp¹Ïªí!$AC$" & totalRows) ' ¹Ï¥Ü·|¤À§OÅã¥Ü¥X ®ø¤Æ¤O
                    Case 4
                        .SetSourceData Source:=Range("²Îp¹Ïªí!$B$1:²Îp¹Ïªí!$B$" & totalRows & ", ²Îp¹Ïªí!$AD$1:²Îp¹Ïªí!$AD$" & totalRows) ' ¹Ï¥Ü·|¤À§OÅã¥Ü¥X §¡®t(¤j¤á)
                    Case 5
                        .SetSourceData Source:=Range("²Îp¹Ïªí!$B$1:²Îp¹Ïªí!$B$" & totalRows & ", ²Îp¹Ïªí!$F$1:²Îp¹Ïªí!$F$" & totalRows & ", ²Îp¹Ïªí!$I$1:²Îp¹Ïªí!$J$" & totalRows & ", ²Îp¹Ïªí!$V$1:²Îp¹Ïªí!$V$" & totalRows)  ' ¹Ï¥Ü·|¤À§OÅã¥Ü¥X ¦¨¥æ»ù¡B¥D¤O¬É¤J¡B´²¤á¤è¦V¡B¥H¤Î¦¨¥æ¶q¡C
                    Case Else
                        .SetSourceData Source:=Range("²Îp¹Ïªí!$B$1:²Îp¹Ïªí!$B$" & totalRows & ", ²Îp¹Ïªí!$F$1:²Îp¹Ïªí!$F$" & totalRows & ", ²Îp¹Ïªí!$V$1:²Îp¹Ïªí!$V$" & totalRows)   ' ¹Ï¥Ü·|¤À§OÅã¥Ü¥X ¦¨¥æ»ù
                End Select
            End With
        End If
        If (sDraw = "Omega" And numChart = 5) Then Exit For
    Next
End Sub
 | 
 |