- ©«¤l
- 9
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 18
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-12-12
- ³Ì«áµn¿ý
- 2013-9-16
|
[µo°Ý] ½Ð±Ð¨âӧǦC¦b¤@±i¹Ïªí¤ºªº¤ÏÂà°ÝÃD
§Ú§Q¥Î Excel VBA ³Ð«Ø¤@ӹϪí¡A¨ä¤º¨Ã¦³¨âӧǦC (series)ª«¥ó¡C¸ê®Æªº¨Ó·½«Y±q¨C¤¤ÀÄÁ¶¡¹j©Ò¬ö¿ýªº¤À®É¸ê®Æ (¬ö¿ý©óÀx¦s®æ¡A¥H¦C¬°¨C¤@µ§³æ¦ì)¡A¬ö¿ýªº¶¶§Ç¬°³Ì±ß®É¶¡¬ö¿ýªÌ±Æ¦C¦b¤W¡C
§Ç¦C1³]©w©ó¥D®y¼Ð¶b¡A¤Ï¬Mªº¬OÄw½X¶qÅܤƱ¡§Î(§Q¥Î°ï¿n¹Ï)¡F§Ç¦C2³]©w©ó´I®y¼Ð¶b¡A¤Ï¬Mªº¬O»ù®æÅܤƱ¡§Î(§é½u¹Ï)¡CX¶b¬°®É¶¡¡BY¶b¥ª°¼¬°»ù®æ¡F¥k°¼¬°Äw½X¼Æ¶q¡C
Ãö©ó¥D®y¼ÐX¶bªºÄݩʳ]©w¦p¤U¡G-
- With ActiveChart..Axes(xlCategory, xlPrimary) '³]©w®y¼ÐX¶b(®É¶¡¶b)ªºÄÝ©Ê
- .ReversePlotOrder = True '¤ÏÂà®y¼Ð¶b¶µ¥Ø
- .CategoryType = xlCategoryScale
- .TickLabels.NumberFormatLocal = "hh:mm" 'Åã¥Ü ®É:¤À
- .TickLabels.Orientation = 90 '¼ÐÅÒ¤å¦rÂà90«×
- .TickLabelPosition = xlTickLabelPositionLow '®y¼Ð¶b¸m©ó¤U¤è
- End With
½Æ»s¥N½X ³o¨S¦³°ÝÃD¡A¹Ï§Î¤]½T¹ê¥i¥H§e²{Äw½X¶qªº¤ÏÂà±Æ¦C¡C¦ý»ù®æ§Ç¦C«oµLªk§e²{¤ÏÂà±Æ¦C¡A¤]´N¬O¦p 13:30 ªº»ù®æ±Æ¦C¦bX¶b³Ì¥ª¤è¡B09:00ªº»ù®æ±Æ¦C¦bX¶b³Ì¥k¤è¡C
¦pªG·Qn³]©w¤U¦C³o¼ËªºÄÝ©Ê¡G- '³]©w°Æ®y¼ÐX¶bªºÄÝ©Ê (¦¨¥æ»ù)
- With ActiveChart.Axes(xlCategory, xlSecondary)
- .ReversePlotOrder = True '¤ÏÂà®y¼Ð¶b¶µ¥Ø
- End With
½Æ»s¥N½X °õ¦æ«o·|¥X²{¿ù»~°T®§¡G'Axes' ¤èªk('_Chart' ª«¥ó)¥¢±Ñ¡C
½Ð°Ý¸Ó¦p¦óקï VBA µ{¦¡½X©Î³]©w¤~¯àÅý§Ç¦C¤Gªº¸ê®Æ¤]¯à¦P¨B¤ÏÂà¡H
P.S. ¦pªk¤W¶Ç¹Ïªí¡H |
|