Board logo

¼ÐÃD: [µo°Ý] °ÊºA­×¥¿¶×¤J¹Ïªíªº³Ì«á¸ê®Æ¦C¤§¦C¼Æ©Ò©µ¦ùªº°ÝÃD [¥´¦L¥»­¶]

§@ªÌ: c_c_lai    ®É¶¡: 2012-4-5 10:00     ¼ÐÃD: °ÊºA­×¥¿¶×¤J¹Ïªíªº³Ì«á¸ê®Æ¦C¤§¦C¼Æ©Ò©µ¦ùªº°ÝÃD

§Ú¦³¤@¨ÇºÃ´b·Q½Ð¦U¦ì¤j¤j«ü¾É¡Aµ{¦¡½X¦p¤U¡G (¸Ì­±¤À§O³B²z¤F6­Ó²Î­p¹Ïªí)
  1. Sub getEndRows()  ' ¥H Excel -> ´¡¤J -> §é½u¹Ï¡Bª½±ø¹Ï ¤è¦¡¤@¤@´¡¤J©ó¤u§@ªí³æ¤ºªºÀˬd¤è¦¡¡C
  2.     Dim oShape As Shape
  3.     Dim numChart As Integer
  4.     Dim totalRows As Single
  5.    
  6.     numChart = 0
  7.    
  8.     Sheets("²Î­p¹Ïªí").Select
  9.     totalRows = Range("B" & Rows.Count).End(xlUp).Row     ' ¶Ç¦^ B Äæ©Ò¨Ï¥ÎÀx¦s®æ¤§³Ì«á¤@®æ¤§¦C¸¹ (¹ê»Ú¶×¤J¸ê®Æ¤§Á`¦C¼Æ)
  10.             
  11.     For Each oShape In ActiveSheet.Shapes
  12.         If oShape.Type = 3 Then
  13.             numChart = numChart + 1
  14.             
  15.             Cells(lines, 36).Value = "²Ä " & lines - 1 & " ­Ó¹Ïªí"           
  16.             Cells(lines, 37).Value = oShape.Name

  17.             ' Shapes(oShape.Name).Select     ' ¥²¶·¥ý¦æ«Å§i oShape.Name ¿ï¾Ü¡A§_«h¥H¤U®y¼Ð¦ì¸m¡B°ª«×¡B¥H¤Î¼e«×¤§­«·s³]©w±N¤©¥H©¿²¤¦ÓµL¹ê½è§@¥Î
  18.             ActiveSheet.ChartObjects(oShape.Name).Activate                     
  19.             Cells(lines, 38).Value = ActiveSheet.ChartObjects(oShape.Name).Name   ' µ²ªG¬Oµ¥©ó oShape.Name
  20.                
  21.             Select Case numChart
  22.                 Case 1
  23.                     ActiveChart.SetSourceData Source:=Range("$B$1:$B$" & totalRows & ", $F$1:$F$" & totalRows & ", $I$1:$J$" & totalRows)  
  24.                 Case 2
  25.                     ActiveChart.SetSourceData Source:=Range("$B$1:$B$" & totalRows & ", $AA$1:$AA$" & totalRows)
  26.                 Case 3
  27.                     ActiveChart.SetSourceData Source:=Range("$B$1:$B$" & totalRows & ", $AC$1:$AC$" & totalRows)
  28.                 Case 4
  29.                     ActiveChart.SetSourceData Source:=Range("$B$1:$B$" & totalRows & ", $AE$1:$AE$" & totalRows)
  30.                 Case 5
  31.                     ActiveChart.SetSourceData Source:=Range("$B$1:$B$" & totalRows & ", $AG$1:$AG$" & totalRows)
  32.                 Case Else
  33.                     ActiveChart.SetSourceData Source:=Range("$B$1:$B$" & totalRows & ", $F$1:$F$" & totalRows & ", $V$1:$V$" & totalRows)   ' ¹Ï¥Ü·|¤À§OÅã¥Ü¥X ¦¨¥æ»ù

  34.                     ' ´ú¸ÕOK«á¡A¤§«á¤S¼W¥[¤F¥H¤U¥|¦æµ{¦¡½X
  35.                     ActiveChart.Axes(xlCategory).TickLabels.NumberFormatLocal = "hh:mm"
  36.                     ActiveChart.Axes(xlCategory).MajorTickMark = xlNone
  37.                     ' ±N®É¶¡¶b±q 0 ¨è«×½u¤U¤è(¹Ïªí¹w³]­È)²¾¦Ü¨ì¹Ïªí¤§³Ì¤U¤è¦ì¸m (­ì¥»¹w³]©ó­t­È¼Æ­È¦C³B¡A¾B»\¤F­t­È¦±½u¤§À˵ø¡F¬G±N¤§²¾¦ì¡A±N¨Ï±oªí®æ©ö©ó¾\Äý)
  38.                    ActiveChart.Axes(xlCategory).TickLabelPosition = xlLow     

  39.                    Cells(lines, 38).Value = ActiveChart.ChartTitle.Text  
  40.             End Select
  41.         End If
  42.     Next
  43. End Sub
½Æ»s¥N½X
1.     §Ú­ì¥»¬O¨Ï¥Î   Shapes(oShape.Name).Select  ¡A¦ý¦b¸Ó²Î­p¹Ïªí¤u§@ªí³æ¤º°õ¦æ®É¬OOK¡A¦ý±N¥¦·h¨ì ThisWorkbook ¤º´N¦³¿ù»~°T®§¡A©ó¬O«K§â¥¦­×§ï¦¨
         ActiveSheet.ChartObjects(oShape.Name).Activate «K¯à¶¶§Q°õ¦æ¡A¨ä­ì¦]¬°¦ó¡H ¥¿½TÀ³¦p¦óÀ³¥Î¡H
2.      ´ú¸ÕOK«á¡A¤§«á§Ú¤S¼W¥[¤F¥|¦æµ{¦¡½X¡Aµ²ªGÅã¥Ü Axes¡BTickLabels¡BctiveChart.ChartTitle.Text µ¥»yªk¤W¤£¥¿½T¡A
                    ActiveChart.Axes(xlCategory).TickLabels.NumberFormatLocal = "hh:mm"
                    ActiveChart.Axes(xlCategory).MajorTickMark = xlNone
                   ActiveChart.Axes(xlCategory).TickLabelPosition = xlLow     
                   Cells(lines, 38).Value = ActiveChart.ChartTitle.Text  
        ½Ð±ÐÀ³¸Ó­n¦p¦ó­×¥¿¤~OK¡H
ÁÂÁ±z¡I
§@ªÌ: GBKEE    ®É¶¡: 2012-4-5 10:12

¦^´_ 1# c_c_lai
  1. Option Explicit
  2. Sub Ex()
  3.     With ActiveSheet.ChartObjects(oShape.Name).Chart
  4.         .Axes(xlCategory).TickLabels.NumberFormatLocal = "hh:mm"
  5.         .Axes(xlCategory).MajorTickMark = xlNone
  6.         .Axes(xlCategory).TickLabelPosition = xlLow
  7.         Cells(Lines, 38).Value = ActiveChart.ChartTitle.Text
  8.     End With
  9. End Sub
½Æ»s¥N½X

§@ªÌ: c_c_lai    ®É¶¡: 2012-4-5 10:21

¤Ó·P¿E±z¤F¡A ¹ï©ó§Ú³o­Ó­èIJºN VBA ªº¤H¨Ó»¡ªº½T¬O¤j¦³À°§U¡A
¥¦©M¤@¯ë¶Ç²Î»y¨¥½T¹ê¦³¨Ç¤£¦P (C/C++,Java....)¡AÁÂÁ±zËç¡I
§@ªÌ: c_c_lai    ®É¶¡: 2012-4-5 21:40

¦U¦ì¤j¤j½ÐÀ°­Ó¦£¡G
§Ú¤w§â GBKEE «e½úªº Code ¤Þ¤J¡A°õ¦æ®É«o¥X²{¤F¥H¤U¤§¿ù»~°T®§¡A±N¥¦­ÌMarked¤S«ì´_¥¿±`¡A
°_°ÝÀ³¦p¦ó³B²z¡H ÁÂÁ¦U¦ì¤j¤j¡I

' °õ¦æ¶¥¬q¿ù»~ '-2147467259 (80004005)':
' Automation ¿ù»~
' µLªk«ü¥Xªº¿ù»~
§@ªÌ: c_c_lai    ®É¶¡: 2012-4-5 21:43

¦^´_ 4# c_c_lai

±æ¤F®×¦^Âжs¡A©Ò¥H¤S¦Aµo¤F¤@¦¸¡A¹ï¤£°_¡I

¦U¦ì¤j¤j½ÐÀ°­Ó¦£¡G
§Ú¤w§â GBKEE «e½úªº Code ¤Þ¤J¡A°õ¦æ®É«o¥X²{¤F¥H¤U¤§¿ù»~°T®§¡A±N¥¦­ÌMarked¤S«ì´_¥¿±`¡A
°_°ÝÀ³¦p¦ó³B²z¡H ÁÂÁ¦U¦ì¤j¤j¡I

' °õ¦æ¶¥¬q¿ù»~ '-2147467259 (80004005)':
' Automation ¿ù»~
' µLªk«ü¥Xªº¿ù»~
§@ªÌ: alexliou    ®É¶¡: 2012-4-6 06:44

¥»©«³Ì«á¥Ñ alexliou ©ó 2012-4-6 15:31 ½s¿è

¦^´_ 1# c_c_lai
1.  ­ì¨Ó²Ä 18¦CªºCode : Shapes(oShape.Name).Select
«e­±¦pªG¨S¼g¬O¦b¨º¸ÌªºShape®É, ¦b³o­Ó¤u§@ªí©MThisWorkbook³£·|µo¥Í¿ù»~
¦pªG§ï¦¨  ActiveSheet.Shapes(oShape.Name).Select   
§Ú´ú¸Õªºµ²ªG¬O¨âÃä³£¥i¥H°õ¦æ
2. ¨º¥|¦æµ{¦¡½X §Ú´ú¸Õªºµ²ªG¬O¥i¥Hwork
§@ªÌ: GBKEE    ®É¶¡: 2012-4-6 07:15

¦^´_ 5# c_c_lai
¶Ç¤WÀɮ׬ݬÝ
§@ªÌ: c_c_lai    ®É¶¡: 2012-4-6 09:08

¦^´_ 7# GBKEE
¤p§Ì±N¹ê»Ú¦b°õ¦æªºµ{¦¡½X¶K¤W¡A·q½Ð¦U¦ì«e½ú«ü¾É¡C
  1. Sub setRowColumn()  ' ¥H Excel -> ´¡¤J -> §é½u¹Ï¡Bª½±ø¹Ï ¤è¦¡¤@¤@´¡¤J©ó¤u§@ªí³æ¤ºªºÀˬd¤è¦¡¡C
  2.     Dim oShape As Shape
  3.     Dim numChart As Integer
  4.     Dim totalRows As Single
  5.    
  6.     numChart = 0
  7.    
  8.     Sheets("²Î­p¹Ïªí").Select
  9.     totalRows = Range("B" & Rows.Count).End(xlUp).Row        ' ¶Ç¦^ B Äæ©Ò¨Ï¥ÎÀx¦s®æ¤§³Ì«á¤@®æ¤§¦C¸¹
  10.             
  11.     For Each oShape In ActiveSheet.Shapes
  12.         If oShape.Type = 3 Then
  13.             numChart = numChart + 1
  14.             
  15.             Active.Shapes(oShape.Name).Select                     ' ¦pªG Shapes «e¥[¤W Active. °õ¦æ®É·|¥X²{  ---->  °õ¦æ¶¥¬q¿ù»~ '424':  ¦¹³B»Ý­nª«¥ó
  16.             ' ActiveSheet.ChartObjects(oShape.Name).Activate
  17.            
  18.             ActiveChart.SetSourceData Source:=Range("$B$1:$B$" & totalRows & ", $F$1:$F$" & totalRows & ", $V$1:$V$" & totalRows)
  19.                      
  20.             With ActiveSheet.ChartObjects(oShape.Name).Chart
  21.                 .Axes(xlCategory).TickLabels.NumberFormatLocal = "hh:mm:ss"
  22.                 .Axes(xlCategory).MajorTickMark = xlCategoryScale
  23.                 .Axes(xlCategory).TickLabelPosition = xlLow
  24.                         
  25.                 Cells(Lines, 38).Value = .ChartTitle.Text
  26.             End With
  27.                   
  28.             ActiveSheet.Shapes(oShape.Name).Left = Cells(31, 1).Left     ' ³]©w¦¹¹Ïªí¹ê»ÚÂ\©ñªº X¡BY ®y¼Ð¦ì¸m¡C
  29.             ActiveSheet.Shapes(oShape.Name).Top = Cells(31, 1).Top
  30.                     
  31.             ActiveChart.ChartArea.Height = 488                           ' ±N­ì¥»³]©w¤§°ª«×½Õ¦Ü¾A«×¦ì¸m
  32.             ActiveChart.ChartArea.Width = 900
  33.             
  34.             ActiveChart.SeriesCollection(1).InvertIfNegative = True
  35.             ActiveChart.SeriesCollection(1).InvertColor = RGB(32, 178, 208)

  36.             With ActiveChart.SeriesCollection(1).Format.Fill
  37.                 .Visible = msoTrue
  38.                 .ForeColor.RGB = RGB(255, 69, 0)
  39.                 .Transparency = 0
  40.                 .Solid
  41.             End With
  42.         End If
  43.     Next
  44. End Sub
½Æ»s¥N½X
1.  ¦pªG Shapes «e¥[¤W Active. °õ¦æ®É·|¥X²{  ---->  °õ¦æ¶¥¬q¿ù»~ '424':  ¦¹³B»Ý­nª«¥ó

    Active.Shapes(oShape.Name).Select                     ' ¦pªG Shapes «e¥[¤W Active. °õ¦æ®É·|¥X²{  ---->  °õ¦æ¶¥¬q¿ù»~ '424':  ¦¹³B»Ý­nª«¥ó
    ' ActiveSheet.ChartObjects(oShape.Name).Activate

2A.  ¦pªG Shapes «e®³±¼¼W¥[¤§ Active. °õ¦æ®É

    Shapes(oShape.Name).Select                     
    ' ActiveSheet.ChartObjects(oShape.Name).Activate

    ©ÎªÌ¬O¥H

    ' Shapes(oShape.Name).Select                     
    ActiveSheet.ChartObjects(oShape.Name).Activate

    ¤è¦¡°õ¦æ®É·|¥X²{  ---->  °õ¦æ¶¥¬q¿ù»~ '5':  µ{§Ç©I¥s©Î¤Þ­z¤£¥¿½T

2B. ¥H 2A ¼Ò¦¡³B²z¡A¤§«á°lÂܵ²ªGµo²{°ÝÃD¥X¦b

    With ActiveSheet.ChartObjects(oShape.Name).Chart
        .Axes(xlCategory).TickLabels.NumberFormatLocal = "hh:mm:ss"
        .Axes(xlCategory).MajorTickMark = xlCategoryScale
        .Axes(xlCategory).TickLabelPosition = xlLow
                        
        Cells(Lines, 38).Value = .ChartTitle.Text
    End With

  2BA:  ¦pªG±N¨ä¤¤ Cells(Lines, 38).Value = .ChartTitle.Text Marked°_¨Ó°õ¦æ

    With ActiveSheet.ChartObjects(oShape.Name).Chart
        .Axes(xlCategory).TickLabels.NumberFormatLocal = "hh:mm:ss"
        .Axes(xlCategory).MajorTickMark = xlCategoryScale
        .Axes(xlCategory).TickLabelPosition = xlLow
                        
        ' Cells(Lines, 38).Value = .ChartTitle.Text
    End With

    °õ¦æ®É·|¥X²{  ---->   °õ¦æ¶¥¬q¿ù»~ '-2147467259 (80004005)':
                          Automation ¿ù»~
                          µLªk«ü¥Xªº¿ù»~

  2BB:  ¦pªG¥u±N¨ä¤¤²Ä¤@¶µ Marked °_¨Ó°õ¦æ

    With ActiveSheet.ChartObjects(oShape.Name).Chart
        ' .Axes(xlCategory).TickLabels.NumberFormatLocal = "hh:mm:ss"
        .Axes(xlCategory).MajorTickMark = xlCategoryScale
        .Axes(xlCategory).TickLabelPosition = xlLow
                        
        Cells(Lines, 38).Value = .ChartTitle.Text
    End With

    °õ¦æ®É·|¥X²{  ---->  °õ¦æ¶¥¬q¿ù»~ '5':  µ{§Ç©I¥s©Î¤Þ­z¤£¥¿½T

  2BC:  ¦pªG¥u±N¨ä¤¤½èºÃªº¨â¶µ Marked °_¨Ó°õ¦æ

    With ActiveSheet.ChartObjects(oShape.Name).Chart
        ' .Axes(xlCategory).TickLabels.NumberFormatLocal = "hh:mm:ss"
        .Axes(xlCategory).MajorTickMark = xlCategoryScale
        .Axes(xlCategory).TickLabelPosition = xlLow
                        
        ' Cells(Lines, 38).Value = .ChartTitle.Text
    End With

    °õ¦æ°_¨Ó²@µL²§¼Ë¡A¦ü¥G¬O¤@¤Á¥¿±`ªº¼Ë¤l¡C

³o©Î³\¬O§Ú¥Î¥\¤´µM¤£¨¬¡A©|½Ð«üÃÒ¡I
§@ªÌ: GBKEE    ®É¶¡: 2012-4-6 09:22

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-4-6 09:35 ½s¿è

¦^´_ 8# c_c_lai
»yªk¿ù»~    Active.Shapes(oShape.Name).Select                     
¥¿½T           ActiveSheet.Shapes(oShape.Name).Select

ÅܼÆLines ¨S¬Ý¨ì§A«ü©w­È ÁÙ¬O·|¦³¿ù»~ªº
Cells(Lines, 38).Value = .ChartTitle.Text

*********
2A.  ¦pªG Shapes «e®³±¼¼W¥[¤§ Active. °õ¦æ®É
    Shapes(oShape.Name).Select                     
    ' ActiveSheet.ChartObjects(oShape.Name).Activate
    ©ÎªÌ¬O¥H
    ' Shapes(oShape.Name).Select                     
    ActiveSheet.ChartObjects(oShape.Name).Activate
    ¤è¦¡°õ¦æ®É·|¥X²{  ---->  °õ¦æ¶¥¬q¿ù»~ '5':  µ{§Ç©I¥s©Î¤Þ­z¤£¥¿½T
***************
2003ª© ¬ÒµL¿ù»~  ½Ðªþ¤WÀÉÀɮפè«K¸Ô¬Ý
§@ªÌ: c_c_lai    ®É¶¡: 2012-4-6 10:05

ªþ¤WÀɮסAÁÂÁ±z¡I
[attach]10316[/attach]
§@ªÌ: c_c_lai    ®É¶¡: 2012-4-6 11:45

¦^´_ 9# GBKEE
¤£ª¾¹D±z¦³¬Ý¨ì§Ú²î¤WªºÀɮ׶ܡH
§@ªÌ: freeffly    ®É¶¡: 2012-4-6 15:23

¦^´_ 11# c_c_lai


    §A¬O­nÅý§Aªº¹Ïªí¤@ª½ºû«ù©Ò¦³¸ê®Æ¶Ü
   ¥u­n¦³·s¸ê®Æ¹Ïªí´N­n¥]§t¨º¦U¸ê®Æ?
    ¦pªG¬OÀ³¸Ó¥Î©w¸q¦WºÙ°µ´N¦n¤ñ¸û¤è«K§a
§@ªÌ: alexliou    ®É¶¡: 2012-4-6 15:31

¦^´_  c_c_lai
»yªk¿ù»~    Active.Shapes(oShape.Name).Select                     
¥¿½T           A ...
GBKEE µoªí©ó 2012-4-6 09:22

¤£¦n·N«ä
ActiveSheet ¥´¦¨Active
§Ú§ï¤@¤U
§@ªÌ: c_c_lai    ®É¶¡: 2012-4-6 16:18

¦^´_ 13# alexliou
ÁÂÁ±z¡I §Ú·|§ó¥¿´ú¸Õ¬Ý¬Ý¡C
¦ý°£¦¹¤§¥~ªº©Ò´£°Ý¿ù»~°T®§¡A¤£ª¾¦³¸Ñ§_ ¡H
ÀɮקڦAªþ¤W¤@¦¸¡A³Â·ÐÀ°§Ú¬Ý¬Ý¬O­þ¸Ì¦³¿ù¡AÁÂÁ±z¡I
[attach]10323[/attach]
§@ªÌ: c_c_lai    ®É¶¡: 2012-4-6 16:34

¦^´_ 13# alexliou
¹ï¤£°_¡A§Ú¨S¯d·N¨ì±zµLªk¤U¸ü¡A§Ú§âµ{¦¡½Xªþ¤W¡A
­è¤~¨Ï¥Î ActiveSheet.Shapes() °õ¦æ´N OK ¤F¡A
µM¦Ó Automation ¿ù»~ ¥H¤Î µ{§Ç©I¥s©Î¤Þ­z¤£¥¿½T ©|¥¼¯à¸Ñ¨M¡A­n³Â·Ð±z¤F¡I
  1. Sub setRowColumn()  ' ¥H Excel -> ´¡¤J -> §é½u¹Ï¡Bª½±ø¹Ï ¤è¦¡¤@¤@´¡¤J©ó¤u§@ªí³æ¤ºªºÀˬd¤è¦¡¡C
  2.     Dim oShape As Shape
  3.     Dim numChart As Integer
  4.     Dim totalRows As Single
  5.    
  6.     numChart = 0
  7.    
  8.     Sheets("²Î­p¹Ïªí").Select
  9.     totalRows = Range("B" & Rows.Count).End(xlUp).Row        ' ¶Ç¦^ B Äæ©Ò¨Ï¥ÎÀx¦s®æ¤§³Ì«á¤@®æ¤§¦C¸¹
  10.             
  11.     For Each oShape In ActiveSheet.Shapes
  12.         If oShape.Type = 3 Then
  13.             numChart = numChart + 1
  14.             
  15.             ActiveSheet.Shapes(oShape.Name).Select                     ' OK!
  16.             ' ActiveSheet.ChartObjects(oShape.Name).Activate
  17.            
  18.             ActiveChart.SetSourceData Source:=Range("$B$1:$B$" & totalRows & ", $F$1:$F$" & totalRows & ", $V$1:$V$" & totalRows)
  19.                      
  20.             With ActiveSheet.ChartObjects(oShape.Name).Chart
  21.                 ' .Axes(xlCategory).TickLabels.NumberFormatLocal = "hh:mm:ss"    ' °õ¦æ¶¥¬q¿ù»~ '-2147467259 (80004005)': Automation ¿ù»~ µLªk«ü¥Xªº¿ù»~
  22.                 .Axes(xlCategory).MajorTickMark = xlCategoryScale
  23.                 .Axes(xlCategory).TickLabelPosition = xlLow
  24.                         
  25.                 ' Cells(2, 26).Value = .ChartTitle.Text                          ' °õ¦æ¶¥¬q¿ù»~ '5':  µ{§Ç©I¥s©Î¤Þ­z¤£¥¿½T
  26.             End With
  27.                   
  28.             ActiveSheet.Shapes(oShape.Name).Left = Cells(3, 1).Left     ' ³]©w¦¹¹Ïªí¹ê»ÚÂ\©ñªº X¡BY ®y¼Ð¦ì¸m¡C
  29.             ActiveSheet.Shapes(oShape.Name).Top = Cells(3, 1).Top
  30.                     
  31.             ActiveChart.ChartArea.Height = 488                           ' ±N­ì¥»³]©w¤§°ª«×½Õ¦Ü¾A«×¦ì¸m
  32.             ActiveChart.ChartArea.Width = 900
  33.             
  34.             ActiveChart.SeriesCollection(1).InvertIfNegative = True
  35.             ActiveChart.SeriesCollection(1).InvertColor = RGB(32, 178, 208)

  36.             With ActiveChart.SeriesCollection(1).Format.Fill
  37.                 .Visible = msoTrue
  38.                 .ForeColor.RGB = RGB(255, 69, 0)
  39.                 .Transparency = 0
  40.                 .Solid
  41.             End With
  42.         End If
  43.     Next
  44.    
  45.     Cells(1, 1).Select
  46. End Sub
½Æ»s¥N½X

§@ªÌ: GBKEE    ®É¶¡: 2012-4-6 17:11

¦^´_ 14# c_c_lai
  1. With ActiveSheet.ChartObjects(oShape.Name).Chart
  2.                 .HasAxis(xlCategory, xlPrimary) = True
  3.            '    .HasAxis(xlCategory, xlPrimary) = False
  4.                ' ¹Ïªí¤W©Ò¦s¦bªº®y¼Ð¶b  ¦¹®y¼Ð¬° False ¤U­±µ{¦¡·|¿ù»~
  5.                 .Axes(xlCategory).MajorTickMark = xlNone
  6.                 .Axes(xlCategory).TickLabelPosition = xlLow
  7.             End With
  8.             ActiveSheet.Shapes(oShape.Name).Left = Cells(3, 1).Left     ' ³]©w¦¹¹Ïªí¹ê»ÚÂ\©ñªº X¡BY ®y¼Ð¦ì¸m¡C
  9.             ActiveSheet.Shapes(oShape.Name).Top = Cells(3, 1).Top
  10.             ' ±N­ì¥»³]©w¤§°ª«×½Õ¦Ü¾A«×¦ì¸m
  11.             ActiveSheet.Shapes(oShape.Name).Height = Cells(3, 1).Resize(20).Height
  12.             ActiveSheet.Shapes(oShape.Name).Width = Cells(3, 1).Resize(, 10).Width

  13.            '''*** InvertIfNegative, InvertColor  ¤£¾A¥Î³o¹Ïªíªº«¬ºA
  14.            '****¥Ñ©ó¹ï¹Ïªíªº¯AÂy©|¤Ö ©Ò¥H¥¿¦b´M§äµª®×¤¤ ©Î½Ð°ª¤â¬Û§U
  15.            'ActiveChart.SeriesCollection(1).InvertIfNegative = True
  16.            'ActiveChart.SeriesCollection(1).InvertColor = RGB(32, 178, 208)
  17.            ' With ActiveChart.SeriesCollection(1).Format.Fill
  18.             '    .Visible = msoTrue
  19.             '    .ForeColor.RGB = RGB(255, 69, 0)
  20.             '    .Transparency = 0
  21.             '    .Solid
  22.             'End With
½Æ»s¥N½X

§@ªÌ: c_c_lai    ®É¶¡: 2012-4-6 19:45

¦^´_ 16# GBKEE
²×©ó¥i¥H¥¿±`¹B§@¤F¡AÁÂÁ±z¡I
°ß¤@¤£¸Ñªº¬O¬°¦ó Cells(Lines, 38).Value = ActiveChart.ChartTitle.Text ·|¦³¿ù»~°T®§¡A¯u§Æ±æ¯à½T¤Á¤F¸Ñ°ÝÃD©Ò¦b¡C
§@ªÌ: c_c_lai    ®É¶¡: 2012-4-6 20:27

¦^´_ 16# GBKEE
§ä¨ìµª®×¤F
  1. ActiveChart.SetElement (msoElementChartTitleCenteredOverlay)   ' ¤@©w­n¥ý«Å§i SelElement¡A §_«h ChartTile °õ¦æ®É·|¥X²{°õ¦æ¶¥¬q¿ù»~ '5':  µ{§Ç©I¥s©Î¤Þ­z¤£¥¿½T
  2.   ActiveChart.ChartTitle.Text = "¦¨¥æ»ù»P¦¨¥æ¶q"
  3. Cells(3, 38).Value = ActiveChart.ChartTitle.Text
½Æ»s¥N½X

§@ªÌ: GBKEE    ®É¶¡: 2012-4-6 20:43

¦^´_ 18# c_c_lai
2003 ¨S  SelElement  ³oÄÝ©Ê
  1. Sub Ex()
  2. With ActiveSheet.ChartObjects(1).Chart
  3. .HasAxis(xlCategory, xlPrimary) = True
  4. .Axes(xlCategory).TickLabels.NumberFormatLocal = "hh:mm"
  5. .Axes(xlCategory).MajorTickMark = xlNone
  6. .Axes(xlCategory).TickLabelPosition = xlLow
  7. 'Cells(Lines, 38).Value = .ChartTitle.Text '2003ª©¤¤ ¦¹¦¡¦³ «¬ºA¤£²Å¦X ªº¿ù»~
  8. MsgBox TypeName(Lines)
  9. MsgBox Lines.Count
  10. Cells(Lines.Count + 1, 38).Value = .ChartTitle.Text
  11. End With
  12. End Sub
½Æ»s¥N½X

§@ªÌ: c_c_lai    ®É¶¡: 2012-4-6 21:57

¦^´_ 19# GBKEE
·PÁ·PÁ¡A¹ê¦b¬OÀò¯q¨}¦h¡I
§@ªÌ: c_c_lai    ®É¶¡: 2012-4-18 11:13

¦^´_ 19# GBKEE
³Ìªñ¹ê»Ú¤@¤f®ð¨C¦¸ Run ¤F¤»­Ó¹Ïªí¡A¥B¬O½u¤WÀH®É­×¥¿¶×¤JÁ`µ§¼Æ (¦p¡G "²Î­p¹Ïªí!$B$1:²Î­p¹Ïªí!$B$" & totalRows )¡A
µ²ªGµo²{¦b¨C¦¸¦Û°Ê§ó·s«á¡A³£ Focus ¦b³Ì«á¤@­Ó¹Ïªí¤W¡C¦pªG¦¹®É°Ê¤FÁä½L´N¥Xª¬ªp¤F¡F
Ä´¦p¡G ±z¥i¯à¦¹®É¦b Excel ¤W­×¥¿¬Y¨Ç¸ê®Æ¡A¦p¡G¨Ï¥Î DEL Áäµ¥¡A«K±N¸Ó³Ì«á Focus ªº¹Ïªíµ¹§R°£±¼¤F¡A
³o¤]¬O§Ú­è­è¨S¯d·N¦Óµo¥Íªº±¡ªp¡C µ²ªG¥u³Ñ¤U¤F¤­­Ó¹Ïªí¡A¸g¥J²ÓÆ[¹î¡Aµoı¥u­n VBA ¦Û°Ê°õ¦æ  
.SetSourceData Source:=Range("²Î­p¹Ïªí!$B$1:²Î­p¹Ïªí!$B$" & totalRows) «á¡A´«¦¨²Ä¤­­Ó¹Ïªí (³Ì«á¤@­Ó¹Ïªí) ³Q
Focus ¤F¡C
½Ð°Ý§Ú­n¦p¦óÁ׶}¦¹§xÂZªº°ÝÃD¡C °²³] µe§¹¹Ïªí«á¡A¤U­Ó«ü¥O¡A¦p¡G Cells(1,1).Select ·íµM«K±N²¾Âà Focus ¨ì A1 Äæ¦ì¤W¤F¡A
¦ý¬O¦pªG±z¦b .SetSourceData °õ¦æ«e¡A¥¿¦b¾\Äý¨ä¥¦ªº¤u§@ªí³æ¡A«h±µ¤U¨Óªºµe­±«K·|³Q¤Á¨ì A1 Äæ¦ì¤W¤F¡C
³o¼Ë³B²z°Z¤£·P¨ì«D±`©_©Ç¡H ¦]¬°¾\Äý­¶­±¬ðµM³Q±j¨îÂಾ¤F¡I
½Ð°Ý¦³§_§PÂ_­ì¥»¾\Äý­¶­±¡B©ÎªÌ¬O­ì¥»´å¼Ð¦b­þ¸Ì¡Aø§¹¹Ï«á¦Û°Ê¤Á¦^¨ì­ì­¶­±¡H ©ÎªÌ¬OÁÙ¦³§ó´Îªº Idea¡H
ÁÂÁ±z¤F¡I
§@ªÌ: GBKEE    ®É¶¡: 2012-4-19 06:55

¦^´_ 21# c_c_lai
¤W¶ÇÀɮ׬ݬÝ
§@ªÌ: c_c_lai    ®É¶¡: 2012-4-19 08:05

¦^´_ 22# GBKEE

¸Ó±¡ªp»Ý¦b½L¤¤¹B§@®É¤~Æ[¹î±o¨ì¡A¦]¬Q¤é½L¤¤¤£¤p¤ß§R±¼³Ì«áªº¨º±i¹Ïªí¡A©È¤£«ÈÆ[¡A©Ò¥H¤µ¤Ñ§Ú¦AÆ[¹î¬Ý¬Ý¡A
¦pªG¤´µM¤@¼Ë§Ú¦A¦V±z¸[§i¡AÁÂÁ±z¡I
§@ªÌ: c_c_lai    ®É¶¡: 2012-4-19 10:39

¦^´_ 22# GBKEE
Æ[¹îµ²ªG¦p¡G
1).   §Ú¬G·N¥ý±N´å¼Ð Focus ¨ì AZ2 Äæ¦ì¤W¡A°µ¬°¤è«K¿ëÃѤ§¥Î¡C
[attach]10498[/attach]

2).  ±µ¤U¤£¥h¸IIJ¥ô¦ó©N©N¡AÆ[¹î»ô¸ê®Æ°ÊºA³B­ù¡A¥u­n¥¦¤@¦^¼g getEndRows ¡A
      °Ê§@µ²§ô«á«K·|¦Û°Ê  Focus ¨ì "¥D¤O¡B´²¤á¡B»P¦¨¥æ»ù¡B¶q" ªº¹Ïªí¤W¡C
[attach]10499[/attach]

½Ð±ÐÀ³¦p¦ó¥hÁקK¦¹ª¬ªp¡A¦Ó¥B¤]¤£·|¼vÅT¨ì­ì¥»¬d¬Ýªº­¶­±¡C
ÁÂÁ±z¡I
  1. Sub Test()
  2.     .
  3.     .
  4.     .
  5.     Call getEndRows("²Î­p¹Ïªí")
  6.     Call getEndRows("Omega")
  7.     .
  8. End Sub

  9. Sub getEndRows(sDraw As String)  
  10.     Dim oShape As Shape
  11.     Dim numChart As Integer
  12.     Dim totalRows As Single
  13.    
  14.     numChart = 0
  15.    
  16.     totalRows = Sheets("²Î­p¹Ïªí").Range("B" & Rows.Count).End(xlUp).Row     ' ¶Ç¦^ B Äæ©Ò¨Ï¥ÎÀx¦s®æ¤§³Ì«á¤@®æ¤§¦C¸¹
  17.     Sheets(sDraw).Select
  18.             
  19.     For Each oShape In ActiveSheet.Shapes
  20.         If oShape.Type = 3 Then
  21.             numChart = numChart + 1
  22.             
  23.             ActiveSheet.ChartObjects(oShape.Name).Activate   
  24.                
  25.             Select Case numChart
  26.                 Case 1
  27.                     ActiveChart.SetSourceData Source:=Range("²Î­p¹Ïªí!$B$1:²Î­p¹Ïªí!$B$" & totalRows & ", ²Î­p¹Ïªí!$AA$1:²Î­p¹Ïªí!$AA$" & totalRows) ' ¹Ï¥Ü·|¤À§OÅã¥Ü¥X ¥D¤O¬É¤J
  28.                 Case 2
  29.                     ActiveChart.SetSourceData Source:=Range("²Î­p¹Ïªí!$B$1:²Î­p¹Ïªí!$B$" & totalRows & ", ²Î­p¹Ïªí!$AB$1:²Î­p¹Ïªí!$AB$" & totalRows) ' ¹Ï¥Ü·|¤À§OÅã¥Ü¥X ¤O®t
  30.                 Case 3
  31.                     ActiveChart.SetSourceData Source:=Range("²Î­p¹Ïªí!$B$1:²Î­p¹Ïªí!$B$" & totalRows & ", ²Î­p¹Ïªí!$AC$1:²Î­p¹Ïªí!$AC$" & totalRows) ' ¹Ï¥Ü·|¤À§OÅã¥Ü¥X ®ø¤Æ¤O
  32.                 Case 4
  33.                     ActiveChart.SetSourceData Source:=Range("²Î­p¹Ïªí!$B$1:²Î­p¹Ïªí!$B$" & totalRows & ", ²Î­p¹Ïªí!$AD$1:²Î­p¹Ïªí!$AD$" & totalRows) ' ¹Ï¥Ü·|¤À§OÅã¥Ü¥X §¡®t(¤j¤á)
  34.                 Case 5
  35.                     ActiveChart.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
  36.                 Case Else
  37.                     ActiveChart.SetSourceData Source:=Range("²Î­p¹Ïªí!$B$1:²Î­p¹Ïªí!$B$" & totalRows & ", ²Î­p¹Ïªí!$F$1:²Î­p¹Ïªí!$F$" & totalRows & ", ²Î­p¹Ïªí!$V$1:²Î­p¹Ïªí!$V$" & totalRows)   ' ¹Ï¥Ü·|¤À§OÅã¥Ü¥X ¦¨¥æ»ù
  38.             End Select
  39.         End If
  40.         
  41.         If (sDraw = "Omega" And numChart = 5) Then Exit For
  42.     Next
  43. End Sub
½Æ»s¥N½X

§@ªÌ: GBKEE    ®É¶¡: 2012-4-19 11:52

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-4-19 12:31 ½s¿è

¦^´_ 24# c_c_lai
°ÝÃD¦b
ActiveSheet.ChartObjects(oShape.Name).Activate
  1. Sub getEndRows(sDraw As String)
  2.     Dim oShape As Shape
  3.     Dim numChart As Integer
  4.     Dim totalRows As Single
  5.     numChart = 0
  6.     totalRows = Sheets("²Î­p¹Ïªí").Range("B" & Rows.Count).End(xlUp).Row     ' ¶Ç¦^ B Äæ©Ò¨Ï¥ÎÀx¦s®æ¤§³Ì«á¤@®æ¤§¦C¸¹
  7.     Sheets(sDraw).Select
  8.     For Each oShape In ActiveSheet.Shapes
  9.         If oShape.Type = 3 Then
  10.             numChart = numChart + 1
  11.             With ActiveSheet.ChartObjects(oShape.Name).Chart
  12.                 Select Case numChart
  13.                     Case 1
  14.                         .SetSourceData Source:=Range("²Î­p¹Ïªí!$B$1:²Î­p¹Ïªí!$B$" & totalRows & ", ²Î­p¹Ïªí!$AA$1:²Î­p¹Ïªí!$AA$" & totalRows) ' ¹Ï¥Ü·|¤À§OÅã¥Ü¥X ¥D¤O¬É¤J
  15.                     Case 2
  16.                         .SetSourceData Source:=Range("²Î­p¹Ïªí!$B$1:²Î­p¹Ïªí!$B$" & totalRows & ", ²Î­p¹Ïªí!$AB$1:²Î­p¹Ïªí!$AB$" & totalRows) ' ¹Ï¥Ü·|¤À§OÅã¥Ü¥X ¤O®t
  17.                     Case 3
  18.                         .SetSourceData Source:=Range("²Î­p¹Ïªí!$B$1:²Î­p¹Ïªí!$B$" & totalRows & ", ²Î­p¹Ïªí!$AC$1:²Î­p¹Ïªí!$AC$" & totalRows) ' ¹Ï¥Ü·|¤À§OÅã¥Ü¥X ®ø¤Æ¤O
  19.                     Case 4
  20.                         .SetSourceData Source:=Range("²Î­p¹Ïªí!$B$1:²Î­p¹Ïªí!$B$" & totalRows & ", ²Î­p¹Ïªí!$AD$1:²Î­p¹Ïªí!$AD$" & totalRows) ' ¹Ï¥Ü·|¤À§OÅã¥Ü¥X §¡®t(¤j¤á)
  21.                     Case 5
  22.                         .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
  23.                     Case Else
  24.                         .SetSourceData Source:=Range("²Î­p¹Ïªí!$B$1:²Î­p¹Ïªí!$B$" & totalRows & ", ²Î­p¹Ïªí!$F$1:²Î­p¹Ïªí!$F$" & totalRows & ", ²Î­p¹Ïªí!$V$1:²Î­p¹Ïªí!$V$" & totalRows)   ' ¹Ï¥Ü·|¤À§OÅã¥Ü¥X ¦¨¥æ»ù
  25.                 End Select
  26.             End With
  27.         End If
  28.         If (sDraw = "Omega" And numChart = 5) Then Exit For
  29.     Next
  30. End Sub
½Æ»s¥N½X

§@ªÌ: c_c_lai    ®É¶¡: 2012-4-19 12:07

¥»©«³Ì«á¥Ñ c_c_lai ©ó 2012-4-19 12:18 ½s¿è

¦^´_ 25# GBKEE
¦pªG§ï¦¨ ActiveSheet.ChartObjects(oShape.Name).Select ¥i¦æ§_¡H

¸g¹ê»Ú´ú¸Õ¡A .Activate = .Select µ²ªG¤@¼Ë¡A
À³¦p¦ó­×¥¿©O¡H ¦pªG±N¥¦ Mask ' ¹Ï§Î«K¨«¼Ë¤F¡I
§@ªÌ: GBKEE    ®É¶¡: 2012-4-19 12:29

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-4-19 12:31 ½s¿è

¦^´_ 26# c_c_lai
25# ªº  µ{¦¡½X §A¦³®M¥Î¸Õ¬Ý¬Ý¶Ü?
¸g¹ê»Ú´ú¸Õ¡A .Activate = .Select µ²ªG¤@¼Ë¡A???
With ActiveSheet.ChartObjects(oShape.Name).Chart    ¨Ã¨S¦³­n  Activate OR .Select
§@ªÌ: c_c_lai    ®É¶¡: 2012-4-19 12:44

¦^´_ 27# GBKEE
¤Ó´Î¤F¡I°ÝÃD²×©ó¸Ñ¨M¤F¡C
½Ð±Ð±z¡G
¨Ï¥Î             With ActiveSheet.ChartObjects(oShape.Name).Chart    »P
¨Ï¥Î            ActiveSheet.ChartObjects(oShape.Name).Activate        
¦b¹ê°ÈÀ³¥Î­±¤W¡A¨ä·N¸q¤W¨ì©³¦³¬Æ»ò®t§O©O¡H With ActiveSheet.ChartObjects(oShape.Name).Chart  
·|¦Û¦æ¦æ¨Ï Select ¶Ü¡H
§@ªÌ: GBKEE    ®É¶¡: 2012-4-19 14:27

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-4-19 14:29 ½s¿è

¦^´_ 28# c_c_lai
ActiveSheet.ChartObjects(oShape.Name).Activate   
³o»yªkªº·N«ä: ±N¥Ø«eªº¹ÏªíÅܦ¨§@¥Î¤¤ªº¹Ïªí ,¿Ã¹õµe­±·|Âಾ¨ì¦¹¹Ïªí
With ActiveSheet.ChartObjects(oShape.Name).Chart     
³o»yªkªº·N«ä  ¦b¤@­Ó³æ¤@ª«¥ó©Î¤@­Ó¨Ï¥ÎªÌ¦Û­q«¬ºA¤W°õ¦æ¤@¨t¦Cªº³¯­z¦¡
¿Ã¹õµe­±¤£·|Âಾ¨ì¦¹¹Ïªí
§@ªÌ: c_c_lai    ®É¶¡: 2012-4-19 15:52

¥»©«³Ì«á¥Ñ c_c_lai ©ó 2012-4-19 16:18 ½s¿è

¦^´_ 29# GBKEE
¦A½Ð±Ð¤@¤U¡G
§Ú°õ¦æø¹Ïªºµ{§Ç¬O¡G
1)  ¸ü¤J¸ê®Æ¥þ³¡©ñ¸m¦b "²Î­p¹Ïªí"¤u§@ªí³æ¡A«ö¶s¿ï¶µ¥þ³¡¦w´¡¦b"Omega"¤u§@ªí³æ¤W¡C
2) ¦pªG¿ï«ö "¥þ³¡­«Ã¸"¡A ¥¦·|¥ýø»s "²Î­p¹Ïªí"¤u§@ªí³æ¤Wªº¹Ïªí¡A±µ¤U¨Ó¦A¥hø»s"Omega"¤u§@ªí³æ¤Wªº¹Ïªí
    (¨â­Ó¤u§@ªí³æªí³æ¤W°õ¦æªºÃ¸¹Ï¼Ò²Õ¬O¤@¼Ëªº¡A¥u¬O¤À§O±N¨â­Ó¤u§@ªí³æ¤Wø»s¦P¼Ë¹Ïªí)
3) ¦b"²Î­p¹Ïªí"¤u§@ªí³æ¤W¦¨¥\¦aø»s¥X¤»­Ó¹Ïªí«á¡A±µµÛ¤S­n¦b"Omega"¤u§@ªí³æ¤W¹º¥X¦P¼Ë¤»­Ó¬Û¦P¹Ïªí®É¡A
     «o¥X²{¤@¿ù»~°T®§  -----  ¨t²Î¿ù»~ &H80040000 (-2147221504)¡C  µL®Äªº OLEVERB µ²ºc
     «ö§¹½T»{¶s«á¡A¤£¤©²z·|¦b°õ¦æ¤@¦¸¡A±µµÛ¤S¥X²{¤@¿ù»~µøµ¡  -----  400
4) Æ[¹îµ²ªG¬O¡G"²Î­p¹Ïªí"¤u§@ªí³æ¤W¦¨¥\¦aø»s¥X¤F¤»­Ó¥¿½T¹Ïªí¡A¦Ó¦b"Omega"¤u§@ªí³æ¤W¦³®É¥u²£¥Í¤F¤@±i¹Ïªí¡A
    ¦³®É«o³£²£¥ÍÁA¤»­Ó¹Ïªí¡A¦ý¨ä¼Æ¦C§¡«D«ü©wªº¼Æ¦C¡A¦Ó¬O"Omega"¤u§@ªí³æ¤W¥»¨­¤§¨ä¥L¥Î³~ªº¼Æ¾Ú¸ê®Æ (¶Ã§ìOmegaªº¨Ï¥Î¸ê®Æ)¡C
½Ð°Ý³o¬O¦óºØ±¡ªp¤~·|¦p¦¹¡H

5) ±N¨ä©Ò¦³¬ÛÃö¼Ò²Õ©ñ¤J¥t¤@ Excel ªí¤º°õ¦æ¡A³£¥¿±`¡C
     ¦ý¤£¦Pªº¬O¡G ³o­Óªí³æªº"Omega"¤u§@ªí³æ¤W¨ÃµL¦s©ñ¥ô¦ó¸ê®Æ¡A¶ÈÂ\©ñ«ö¶s¦Ó¤w¡C   (±N¥¦ªþ¤W°Ñ¦Ò¡A©Ò¦³¼Ò²Õ§¡¤@­P)
    (¬°¤F»P­ì©l¤@­P¡A"Omega" ªº¹Ïªí¦ì¸m¬O¦b AI:AF ¶¡)
[attach]10509[/attach]
(³Ì«á¤äªþ¥ó¤~¬O)
§@ªÌ: c_c_lai    ®É¶¡: 2012-4-19 17:25

¦^´_ 29# GBKEE

§Ú±N¦¹¨â­¶¤§µe­±ªþ¤W¨Ñ°Ñ¦Ò¡G
[attach]10513[/attach]
[attach]10515[/attach]
§@ªÌ: GBKEE    ®É¶¡: 2012-4-19 17:48

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-4-19 17:52 ½s¿è

¦^´_ 31# c_c_lai
¹ï¤£°_ :§Aªºª©¥»¸û¥ý¶i §Ú¤£©ö°»¿ù
¥u¦³§A¾É¤Þ·s¼W¹Ïªí ¸û²©öªº¤èªk, ¤§«á§A¦A¨Ì§Aªº»Ý¨D­×§ï
  1. Sub Ex()
  2. Dim Rng As Range, xi As Integer
  3. With ActiveSheet
  4.     .ChartObjects.Delete  '¹Ïªí¥þ³¡§R°£
  5.     For xi = 0 To 4
  6.        ' Set Rng = .[a1].Offset(, xi * 10)  ' ¶¡¹j10Äæ
  7.         Set Rng = .[a1].Offset(xi * 15)    ' ¶¡¹j15¦C
  8.         With .ChartObjects.Add(Rng.Left, Rng.Top, Rng.Resize(, 10).Width, Rng.Resize(10).Height).Chart
  9.                  ' .ChartObjects.Add(Left, Top, Width, Height)  '¹Ïªí·s¼W( ¥kÃä¦ì¸m, ¤W¤è¦ì¸m ,¼e«×, °ª«× )
  10.             .SetSourceData Source:=Sheets("²Î­p¹Ïªí").UsedRange.Columns(xi + 1), PlotBy:=xlColumns
  11.             .HasTitle = True
  12.             .ChartTitle.text = "¹Ïªí " & xi + 1      
  13.         End With
  14.     Next
  15.    End With
  16. End Sub
½Æ»s¥N½X

§@ªÌ: c_c_lai    ®É¶¡: 2012-4-20 08:24

¦^´_ 32# GBKEE
§Ú±o¨ì¤F¤@­Ó¤ß±o¡A¨º´N¬O·í±z¹Ïªíªº¸ê®Æ¨Ó·½«ü¦V«D¥»¤u§@ªí³æ®É (¨Ò¦p¡G­n¦b A¤u§@ªí³æ ø»s²Î­p¹Ïªí¡B¦Ó¨Ó·½¸ê®Æ«o¦b B¤u§@ªí³æ )¡A
©ó­«·s¦bø»s®É¡A®É¦Ó¥¿±`¡A¦h®É¶Ã§Ç¡C
¦ý¬O¸g¦h¦¸´ú¸Õµo²{³Ì­«­nªºÄpµ²¬O¡G ·í A¤u§@ªí³æ ¤º®e°£¤F©Ò»Ý¿ï¾Ü«ö¶s¥~¡AµL¥ô¦ó¸ê®Æ¦s¦b¡A¤@¤Á¥¿±`¡C
                                                                     ***  ·í A¤u§@ªí³æ ¤º®e°£¤F©Ò»Ý¿ï¾Ü«ö¶s¥~¡A¤w¸g¦s¦b¦³¨ä¥Lªº¥ô¦ó¸ê®Æ (¦pªþ¥ó¤§ª¬ªp)¡A¤Ö¤Ö°õ¦æ¥¿±`¡B¦h®É²æ½u¶Ã§Ç¡C
·Ð½ÐÀ°¦£¬Ý¬Ý¡AÁÂÁ±z¡I
[attach]10522[/attach]
[attach]10523[/attach]
[attach]10524[/attach]
§@ªÌ: GBKEE    ®É¶¡: 2012-4-21 10:54

¦^´_ 33# c_c_lai
­«·s ­×§ï¾ã²z §Aªº µ{¦¡½X , ½Ð±N¥þ³¡ªºµ{¦¡½X ½Æ»s¦b¦P¤@¼Ò²Õ¤¤.
  1. Dim xRow(1 To 6), yCol(1 To 6), cWidth(1 To 6), cHeight(1 To 6), xText(1 To 6)
  2. Dim Chart_Source(1 To 6)
  3. Private Sub °}¦C³]©w(ShName As String)
  4.     Dim Rng As Range
  5.     xRow(1) = IIf(ShName = "Omega", 4, 1)
  6.     xRow(2) = IIf(ShName = "Omega", 18, 16)
  7.     xRow(3) = IIf(ShName = "Omega", 4, 1)
  8.     xRow(4) = IIf(ShName = "Omega", 18, 16)
  9.     xRow(5) = IIf(ShName = "Omega", 4, 1)
  10.     xRow(6) = 31
  11.     yCol(1) = IIf(ShName = "Omega", 55, 1)
  12.     yCol(2) = IIf(ShName = "Omega", 35, 1)
  13.     yCol(3) = IIf(ShName = "Omega", 39, 5)
  14.     yCol(4) = IIf(ShName = "Omega", 39, 5)
  15.     yCol(5) = IIf(ShName = "Omega", 43, 9)
  16.     yCol(6) = 1
  17.     cWidth(1) = IIf(ShName = "Omega", 209, 222)
  18.     cWidth(2) = IIf(ShName = "Omega", 209, 222)
  19.     cWidth(3) = 209
  20.     cWidth(4) = 209
  21.     cWidth(5) = 405
  22.     cWidth(6) = 810
  23.     cHeight(1) = 240
  24.     cHeight(2) = 240
  25.     cHeight(3) = 240
  26.     cHeight(4) = 240
  27.     cHeight(5) = IIf(ShName = "Omega", 485, 488)
  28.     cHeight(6) = 480
  29.     xText(1) = "¥D¤O¬É¤J"
  30.     xText(2) = "¤O®t"
  31.     xText(3) = "®ø¤Æ¤O"
  32.     xText(4) = "§¡®t(¤j¤á)"
  33.     xText(5) = "¥D¤O¡B´²¤á¡B»P¦¨¥æ»ù¡B¶q"
  34.     xText(6) = "¦¨¥æ»ù»P¦¨¥æ¶q"
  35.     With Sheets("²Î­p¹Ïªí")
  36.         Set Rng = .Range("A1").CurrentRegion
  37.         Set Chart_Source(1) = Union(Rng.Columns(2), Rng.Columns(27))
  38.         Set Chart_Source(2) = Union(Rng.Columns(2), Rng.Columns(28))
  39.         Set Chart_Source(3) = Union(Rng.Columns(2), Rng.Columns(29))
  40.         Set Chart_Source(4) = Union(Rng.Columns(2), Rng.Columns(30))
  41.         Set Chart_Source(5) = Union(Rng.Columns(2), Rng.Columns(6), Rng.Columns(9), Rng.Columns(10), Rng.Columns(22))
  42.         Set Chart_Source(6) = Union(Rng.Columns(2), Rng.Columns(6), Rng.Columns(22))
  43.      End With
  44. End Sub
  45. Sub ¥þ³¡­«Ã¸()  '­«Ã¸²Î­p¹Ïªí ¤]¬O¥Î¦¹µ{§Ç
  46.     »s¹Ïµ{§Ç Sheets(Array("²Î­p¹Ïªí", "Omega"))
  47. End Sub
  48. Sub ­«Ã¸Omega()
  49.     »s¹Ïµ{§Ç Sheets(Array("Omega"))
  50. End Sub
  51. Private Sub »s¹Ïµ{§Ç(xlSh As Sheets)     '¥þ³¡­«Ã¸
  52.     Dim Sh As Worksheet, xi As Integer
  53.     For Each Sh In xlSh   '"'Sheets(Array("²Î­p¹Ïªí", "Omega"))
  54.         Sh.ChartObjects.Delete
  55.         °}¦C³]©w Sh.Name
  56.         For xi = 1 To IIf(Sh.Name = "Omega", 5, 6)
  57.             With Sh.ChartObjects.Add(Sh.Cells(xRow(xi), yCol(xi)).Left, Sh.Cells(xRow(xi), yCol(xi)).Top, cWidth(xi), cHeight(xi)).Chart
  58.                 .ChartType = IIf(xi >= 5, xlLine, xlColumnStacked)  'xlLine-> §é½u¹Ï 'xlColumnStacke-> °ïÅ|ª½±ø¹Ï
  59.                 .SetSourceData Source:=Chart_Source(xi)
  60.                 .HasLegend = 0                                          '¹Ïªíªº¹Ï¨Ò:  ¤£¥i¨£
  61.                 .SeriesCollection(1).AxisGroup = IIf(xi >= 5, 2, 1)
  62.                 With .Axes(xlCategory)                'X®y¼Ð¶b
  63.                     .CategoryType = xlCategoryScale
  64.                     .TickLabels.NumberFormatLocal = "hh:mm"
  65.                     .MinorTickMark = xlNone
  66.                     .Border.Weight = xlHairline
  67.                     .Border.LineStyle = xlNone
  68.                     .TickLabelPosition = xlLow
  69.                     .TickLabels.Font.Size = 10
  70.                 End With
  71.                '''''''''''''''''''''''''
  72.                 If .ChartType = xlColumnStacked Then              '°ïÅ|ª½±ø¹Ï
  73.                     .SeriesCollection(1).Shadow = False           '¹Ïªí¤¤ªº¼Æ¦C(1)
  74.                     .SeriesCollection(1).InvertIfNegative = True
  75.                     With .SeriesCollection(1).Border
  76.                         .Weight = xlHairline
  77.                         .LineStyle = xlNone
  78.                     End With
  79.                     With .SeriesCollection(1).Interior
  80.                         .ColorIndex = 5
  81.                         .PatternColorIndex = 42
  82.                         .Pattern = xlSolid
  83.                     End With
  84.                 Else                                               '§é½u¹Ï
  85.                     .HasLegend = True
  86.                     .Legend.Top = 1
  87.                     .Legend.Position = xlCorner
  88.                     .SeriesCollection(1).MarkerStyle = xlNone
  89.                     With .Legend.Border
  90.                         .Weight = xlHairline
  91.                         .LineStyle = xlNone
  92.                     End With
  93.                 End If
  94.                 '''''''''''''''''''''''''''
  95.                 With .Axes(xlValue).TickLabels.Font   'Y®y¼Ð¶b¤W¨è«×ªº¨è«×¼ÐÅÒªº¦rÅé
  96.                     .FontStyle = "¼Ð·Ç"
  97.                     .Size = 10
  98.                 End With
  99.                 .HasTitle = True                        '¹Ïªíªº¼ÐÃD   ¥i¨£
  100.                  With .ChartTitle                       '¹Ïªíªº¼ÐÃD
  101.                     .Top = 1
  102.                     .text = xText(xi)
  103.                     .Font.Size = 14
  104.                 End With
  105.                 With .PlotArea                          ' ¹ÏªíªºÃ¸¹Ï°Ï
  106.                     .Top = 1
  107.                     .Left = 1
  108.                     .Width = cWidth
  109.                     .Height = cHeight
  110.                     .Interior.ColorIndex = xlNone
  111.                 End With
  112.             End With
  113.         Next
  114.     Next
  115. End Sub
½Æ»s¥N½X

§@ªÌ: c_c_lai    ®É¶¡: 2012-4-21 11:54

¦^´_ 34# GBKEE
¦Ñ¬O¥´ÂZ±z¤]·|·P¨ì¤£¦n·N«äªº¡A¦ý¤£¥©ªº¥¦¥X²{¦p¤Uªº¿ù»~°T®§¡A¥¦¤S¨S«ü¥X¬O­þ¸Ì¡A¥u±o¨D§U±z¤F¡I
[attach]10553[/attach]
§@ªÌ: GBKEE    ®É¶¡: 2012-4-21 14:36

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-4-21 14:37 ½s¿è

¦^´_ 35# c_c_lai
¦b2003ª©¬O¨S³o°ÝÃDªº ¨ºµy¥[­×§ï ¦p¤U
  1. Sub ¥þ³¡­«Ã¸()  '­«Ã¸²Î­p¹Ïªí ¤]¬O¥Î¦¹µ{§Ç
  2.     »s¹Ïµ{§Ç "²Î­p¹Ïªí"
  3.     ­«Ã¸Omega
  4. End Sub
  5. Sub ­«Ã¸Omega()
  6.     »s¹Ïµ{§Ç "Omega"
  7. End Sub
  8. Private Sub »s¹Ïµ{§Ç(xlSh As String)      '¥þ³¡­«Ã¸
  9.     Dim Sh As Worksheet, xi As Integer
  10.     Set Sh = Sheets(xlSh)
  11.     Sh.ChartObjects.Delete
  12.     °}¦C³]©w Sh.Name
  13.     For xi = 1 To IIf(Sh.Name = "Omega", 5, 6)
  14.         With Sh.ChartObjects.Add(Sh.Cells(xRow(xi), yCol(xi)).Left, Sh.Cells(xRow(xi), yCol(xi)).Top, cWidth(xi), cHeight(xi)).Chart
  15.             .ChartType = IIf(xi >= 5, xlLine, xlColumnStacked)  'xlLine-> §é½u¹Ï 'xlColumnStacke-> °ïÅ|ª½±ø¹Ï
  16.             .SetSourceData Source:=Chart_Source(xi)
  17.             .HasLegend = 0                                          '¹Ïªíªº¹Ï¨Ò:  ¤£¥i¨£
  18.             .SeriesCollection(1).AxisGroup = IIf(xi >= 5, 2, 1)
  19.             With .Axes(xlCategory)                'X®y¼Ð¶b
  20.                 .CategoryType = xlCategoryScale
  21.                 .TickLabels.NumberFormatLocal = "hh:mm"
  22.                 .MinorTickMark = xlNone
  23.                 .Border.Weight = xlHairline
  24.                 .Border.LineStyle = xlNone
  25.                 .TickLabelPosition = xlLow
  26.                 .TickLabels.Font.Size = 10
  27.             End With
  28.             '''''''''''''''''''''''''
  29.             If .ChartType = xlColumnStacked Then              '°ïÅ|ª½±ø¹Ï
  30.                 .SeriesCollection(1).Shadow = False           '¹Ïªí¤¤ªº¼Æ¦C(1)
  31.                 .SeriesCollection(1).InvertIfNegative = True
  32.                 With .SeriesCollection(1).Border
  33.                     .Weight = xlHairline
  34.                     .LineStyle = xlNone
  35.                 End With
  36.                 With .SeriesCollection(1).Interior
  37.                     .ColorIndex = 5
  38.                     .PatternColorIndex = 42
  39.                     .Pattern = xlSolid
  40.                 End With
  41.             Else                                               '§é½u¹Ï
  42.                 .HasLegend = True
  43.                 .Legend.Top = 1
  44.                 .Legend.Position = xlCorner
  45.                 .SeriesCollection(1).MarkerStyle = xlNone
  46.                 With .Legend.Border
  47.                     .Weight = xlHairline
  48.                     .LineStyle = xlNone
  49.                 End With
  50.             End If
  51.                 '''''''''''''''''''''''''''
  52.             With .Axes(xlValue).TickLabels.Font   'Y®y¼Ð¶b¤W¨è«×ªº¨è«×¼ÐÅÒªº¦rÅé
  53.                 .FontStyle = "¼Ð·Ç"
  54.                 .Size = 10
  55.             End With
  56.             .HasTitle = True                        '¹Ïªíªº¼ÐÃD   ¥i¨£
  57.             With .ChartTitle                       '¹Ïªíªº¼ÐÃD
  58.                 .Top = 1
  59.                 .text = xText(xi)
  60.                 .Font.Size = 14
  61.             End With
  62.             With .PlotArea                          ' ¹ÏªíªºÃ¸¹Ï°Ï
  63.                 .Top = 1
  64.                 .Left = 1
  65.                 .Width = cWidth
  66.                 .Height = cHeight
  67.                 .Interior.ColorIndex = xlNone
  68.             End With
  69.         End With
  70.     Next
  71. End Sub
½Æ»s¥N½X

§@ªÌ: c_c_lai    ®É¶¡: 2012-4-21 15:24

¦^´_ 36# GBKEE
¿ù»~°T®§¤@¼Ë¡Aµo²{°ÝÃDÀ³¸Ó¬O¥X¦b  ----> °}¦C³]©w  ¤W¡C
  1. Dim xRow(1 To 6), yCol(1 To 6), cWidth(1 To 6), cHeight(1 To 6), xText(1 To 6)
  2. Dim Chart_Source(1 To 6)

  3. Private Sub °}¦C³]©w(ShName As String)
  4.     Dim Rng As Range

  5.     xRow(1) = IIf(ShName = "Omega", 4, 1)
  6.     xRow(2) = IIf(ShName = "Omega", 18, 16)
  7.     xRow(3) = IIf(ShName = "Omega", 4, 1)
  8.     xRow(4) = IIf(ShName = "Omega", 18, 16)
  9.     xRow(5) = IIf(ShName = "Omega", 4, 1)
  10.     xRow(6) = 31

  11.     yCol(1) = IIf(ShName = "Omega", 55, 1)
  12.     yCol(2) = IIf(ShName = "Omega", 35, 1)
  13.     yCol(3) = IIf(ShName = "Omega", 39, 5)
  14.     yCol(4) = IIf(ShName = "Omega", 39, 5)
  15.     yCol(5) = IIf(ShName = "Omega", 43, 9)
  16.     yCol(6) = 1

  17.     cWidth(1) = IIf(ShName = "Omega", 209, 222)
  18.     cWidth(2) = IIf(ShName = "Omega", 209, 222)
  19.     cWidth(3) = 209
  20.     cWidth(4) = 209
  21.     cWidth(5) = 405
  22.     cWidth(6) = 810

  23.     cHeight(1) = 240
  24.     cHeight(2) = 240
  25.     cHeight(3) = 240
  26.     cHeight(4) = 240
  27.     cHeight(5) = IIf(ShName = "Omega", 485, 488)
  28.     cHeight(6) = 480

  29.     xText(1) = "¥D¤O¬É¤J"
  30.     xText(2) = "¤O®t"
  31.     xText(3) = "®ø¤Æ¤O"
  32.     xText(4) = "§¡®t(¤j¤á)"
  33.     xText(5) = "¥D¤O¡B´²¤á¡B»P¦¨¥æ»ù¡B¶q"
  34.     xText(6) = "¦¨¥æ»ù»P¦¨¥æ¶q"

  35.     With Sheets("²Î­p¹Ïªí")
  36.         Set Rng = .Range("A1").CurrentRegion
  37.         Set Chart_Source(1) = Union(Rng.Columns(2), Rng.Columns(27))
  38.         Set Chart_Source(2) = Union(Rng.Columns(2), Rng.Columns(28))
  39.         Set Chart_Source(3) = Union(Rng.Columns(2), Rng.Columns(29))
  40.         Set Chart_Source(4) = Union(Rng.Columns(2), Rng.Columns(30))
  41.         Set Chart_Source(5) = Union(Rng.Columns(2), Rng.Columns(6), Rng.Columns(9), Rng.Columns(10), Rng.Columns(22))
  42.         Set Chart_Source(6) = Union(Rng.Columns(2), Rng.Columns(6), Rng.Columns(22))
  43.     End With

  44. End Sub
½Æ»s¥N½X

§@ªÌ: GBKEE    ®É¶¡: 2012-4-21 15:37

¦^´_ 37# c_c_lai
¤W¶Ç§AªºÀɮ׬ݬÝ
§@ªÌ: c_c_lai    ®É¶¡: 2012-4-21 15:58

¦^´_ 38# GBKEE

[attach]10562[/attach]
§@ªÌ: GBKEE    ®É¶¡: 2012-4-21 16:12

¦^´_ 39# c_c_lai
©_©Ç §Ú°õ¦æ Sub ¥þ³¡­«Ã¸()  ©Î Sub ­«Ã¸Omega() ³£¨S°ÝÃDªü
½Ð°Ý§A¬O¦p¦ó°õ¦æ Sub ¥þ³¡­«Ã¸()  ©Î Sub ­«Ã¸Omega()
§@ªÌ: c_c_lai    ®É¶¡: 2012-4-21 16:22

¦^´_ 40# GBKEE

[attach]10564[/attach]
§@ªÌ: GBKEE    ®É¶¡: 2012-4-21 16:39

¦^´_ 41# c_c_lai
¨S2010ª© ­þ§Ú¤]¨Sªk«×¤F
§@ªÌ: c_c_lai    ®É¶¡: 2012-4-21 16:59

¦^´_ 42# GBKEE
½Ð±Ð±z¡G
Dim xRow(1 To 6), yCol(1 To 6), cWidth(1 To 6), cHeight(1 To 6), xText(1 To 6)
Dim Chart_Source(1 To 6)

³o¨â¦æ¬O¦b«Å§i°}¦C (Array) ¶Ü¡H  (1 To 6) ¡H  ¤@ºû°}¦C¶Ü¡H
°£¤F³oµ¥«Å§i¤è¦¡¥~¡AÁÙ¦³¦óºØ¤è¦¡ªí¹F¡H
§@ªÌ: GBKEE    ®É¶¡: 2012-4-21 17:39

¦^´_ 43# c_c_lai
  1. Option Explicit
  2. Sub Ex()
  3.     Dim xRow(), i As Integer
  4.     xRow = Array(1, 2, 3, 4)    'xRow() ¬O¬°°ÊºA°}¦C
  5.     For i = 0 To 3
  6.         MsgBox xRow(i)
  7.     Next
  8. End Sub
  9. Sub Ex1()
  10.     Dim xRow(4), i As Integer
  11.     'xRow(4) ¬O¬°ÀRºA°}¦C
  12.     '³Ì¤p¥i¨Ï¥Îªº°}¦C¯Á¤Þ ¹w³]¬° 0  ¥i¥Î  Option Base {0 | 1} ¨Ó§ïÅÜ ¬O0 ©Î 1
  13.     '³Ì¤j¥i¨Ï¥Îªº°}¦C¯Á¤Þ=4
  14.     'xRow = Array(1, 2, 3, 4,5)  'µLªk¤@¦¸µ¹­È ,ÀRºA°}¦C ¶· ¤@¤@«ü©w­È
  15.     xRow(0) = 1
  16.     xRow(1) = 2
  17.     xRow(2) = 3
  18.     xRow(3) = 4
  19.     xRow(4) = 5
  20.     For i = 0 To 4
  21.         MsgBox xRow(i)
  22.     Next
  23. End Sub
  24. Sub Ex2()
  25.     Dim xRow(4 To 8), i As Integer
  26.     'xRow(4 to 8) ¬O¬°ÀRºA°}¦C
  27.     '³]©w: ³Ì¤p¥i¨Ï¥Îªº°}¦C¯Á¤Þ =4 , ³Ì¤j¥i¨Ï¥Îªº°}¦C¯Á¤Þ = 8   
  28.     'xRow = Array(1, 2, 3, 4,5)  'µLªk¤@¦¸µ¹­È ,ÀRºA°}¦C ¶· ¤@¤@«ü©w­È
  29.     xRow(4) = 1               '
  30.     xRow(5) = 2                '
  31.     xRow(6) = 3
  32.     xRow(7) = 4
  33.     xRow(8) = 5
  34.     For i = 4 To 8
  35.         MsgBox xRow(i)
  36.     Next
  37. End Sub
½Æ»s¥N½X

§@ªÌ: c_c_lai    ®É¶¡: 2012-4-22 13:15

¥»©«³Ì«á¥Ñ c_c_lai ©ó 2012-4-22 13:20 ½s¿è

¦^´_ 44# GBKEE
¬Ó¤Ñ¤£¶d¦³¤ß¤H¡A²×©ó§ä¨ì¬°¦ó«¬ºA¤£²Å¤F¡C
  1.             With .PlotArea                          ' ¹ÏªíªºÃ¸¹Ï°Ï
  2.                 .Top = 1
  3.                 .Left = 1
  4.                 .Width = cWidth
  5.                 .Height = cHeight
  6.                 .Interior.ColorIndex = xlNone
  7.             End With
½Æ»s¥N½X
°ÝÃD¥X¦b cWidth¡B¥H¤Î cHeight ¨â­ÓÅܼƪº«Å§i¡A¥¦­Ì°_ÀY¬O«Å§i¦¨ °}¦C«¬ºAªº¡C
©Ò¥H¹À¡I

  1.            With .PlotArea                          ' ¹ÏªíªºÃ¸¹Ï°Ï
  2.                 .Top = 16
  3.                 .Left = 1
  4.                 .Width = cWidth(xi)
  5.                 .Height = cHeight(xi)
  6.                 .Interior.ColorIndex = xlNone
  7.             End With
½Æ»s¥N½X
¦p¦¹¤~¹ï¡I ÁöµM¬O¤p¦a¤è¡A«o§â¦Ñ©R§Ö·d±¼¤F¡I
¦p¤µ¦A§â¥Lµy¥[­×¹¢¦¨§Ú­nªº»Ý¨D¡A§Ú§â¥¿½TªºÀÉ®×¥ç¤@¨Öªþ¤W¡A
¥i¨Ñ¦³¤ß¦V¾Çªº¦@­×­Ì¤@¦P¨Ó¬ã²ß¡B°Q½×¡C

[attach]10575[/attach]

[attach]10576[/attach]

®tÂI§Ñ¤F¦V±z»¡ÁnÁÂÁ¡I
ªü¨½¤ú¨§¡I
§@ªÌ: GBKEE    ®É¶¡: 2012-4-22 15:02

¦^´_ 45# c_c_lai
³o¤Ó²Ê¤ß,ÁÙ¬O§A²Ó¤ßªº§ä¥X¨Ó,
§Ú¬d¥X 2003ª©  ³o¿ù»~:
¦b¹Ïªí: ¹Ïªí°Ï, ø¹Ï°Ï.µ¥ ¦³¥i«ü©w Left ,Top, Width  ,Height ªº¦a¤è
³£¥i¥H±µ¨ü³o°}¦C¤£¥Î¯Á¤Þ­È , ·|¤ñ·Ó ¥ý«e¨Ï¥Î¹Lªº¯Á¤Þ­È  ¦p¤U
With Sh.ChartObjects.Add(Sh.Cells(xRow(xi), yCol(xi)).Left, Sh.Cells(xRow(xi), yCol(xi)).Top, cWidth(xi), cHeight(xi)).Chart


[attach]10579[/attach]
§@ªÌ: c_c_lai    ®É¶¡: 2012-4-23 11:53

¦^´_ 46# GBKEE
³o¬O³o­ÓijÃDªº³Ì«á¤@¦¸´£°Ý¡G
Set Rng = .Range("A1").CurrentRegion
¾Ì§Ú­Ó¤HªºÁo©ú¤~´¼¡AªFºËºË¦èºVºV¤]¹ê¦b¬Ý¤£¥X¥¦ªº¹ê»Ú¥Nªí§t¸q¡A
¥¦¦b´£¥Ü¬Æ»ò¡A¥¦§êºtªº¸}¦â¬O¬Æ»ò¡H ¦³¦óÁ|¨¬»´­«¡H
¨C¦¸«ö F1 ®É¡A¨ä»¡©ú¯u¦³¦p¸t¸g¡A¦³¬Ý¨SÀ´¡C
ÁÂÁ±z¡I
§@ªÌ: GBKEE    ®É¶¡: 2012-4-23 12:20

¦^´_ 47# c_c_lai
CurrentRegion ÄÝ©Ê ¡A¸Óª«¥ó¥Nªí¥Ø«eªº°Ï°ì¡C¥Ø«e°Ï°ì¬O«ü¥H¥ô·NªÅ¥Õ¦C¤ÎªÅ¥ÕÄ檺²Õ¦X¬°Ãä¬Éªº½d³ò¡C°ßŪ¡C
  1. ActiveCell.CurrentRegion.Select
½Æ»s¥N½X
¦p¹Ï ¥|­ÓÀx¦s®æ¥ô¿ï¤@­Ó  °õ¦æ  ³oµ{¦¡½X ¬Ý¬Ý¦³¦óÅܤƦp¦ó

[attach]10600[/attach]
§@ªÌ: cfuxiong    ®É¶¡: 2012-4-27 19:16

¦^´_ 45# c_c_lai
c_c_laiª©¤j¡F§A¦n¡K¬Ý¤F§AªºExcel¹Ïªí¥u¦³Æg¹Ä¡K§Æ±æ¦h¦hµoªí¤å³¹¨Ñ§Ú­Ì¾Ç²ß¡KÁÂÁ¤F~~
§@ªÌ: noorudin    ®É¶¡: 2012-6-8 17:42

´N¬O¦b³oùدà¾Ç¨ì«Ü¦hªF¦è¡A¯à¤H¦h¯«¤H§ó¦h




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