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

[µo°Ý] ½Ð°Ý¸Ó¦p¦ó¥ÎVBA¦Û°Ê¤Æ¥XªÑ²¼K½u¹Ï©O¡H

[µo°Ý] ½Ð°Ý¸Ó¦p¦ó¥ÎVBA¦Û°Ê¤Æ¥XªÑ²¼K½u¹Ï©O¡H

¥»©«³Ì«á¥Ñ j1221 ©ó 2011-1-16 23:50 ½s¿è

¦U¦ì«e½ú¦n¡A¤p§Ì¤S¨Ó¥oÂZ¤F¡A³o¦¸§Úªº°ÝÃD¦p¤U¡G

§Ú§Q¥ÎVBA¥ý§ì¥X§Ú­nªº¸ê®Æ«á¡AµM«á¦A±N©Ò§ì¥X¨Óªº¸ê®Æ¤Æ¦¨K½u¹Ï

¦bµe¹Ïªº³¡¥÷¡A¦]¬°¤p§Ì¤£ª¾¹D¸Ó«ç»ò¼g¡A©Ò¥H§Ú¬O§Q¥Î¿ý»s¥¨¶°ªº¥\¯à¡A§â¥¨¶°»s§@¥X¨Ó¡C

¦ý»s§@¦n¤§«á¡A·í§Ú·Q­n­«·s°õ¦æ¤@¦¸¥¨¶°ªº®É­Ô¡A¸õ¥X¹ï¸Üµøµ¡¡uChartType ¤èªk(Chartª«¥ó)¥¢±Ñ¡v

¥i§_½Ð°Ý¬O¬Æ»ò°ÝÃD¡A¸Ó¦p¦ó¸Ñ¨M©O¡H

·Ð½Ð°Ñ¾\ªþ¥ó(Module 2)

test1.rar (170.94 KB)
§Ú·R³Â»¶®a±Ú°Q½×°Ï¡I¡I

¦^´_ 13# j1221


    Sheets("data").Cells(i, 3).Value = Val(f)
¦]¬°inputbox¦ì«ü©wÅܼƫ¬ºA«h·|¥H¦r¦ê§ÎºAÀq»{
©Ò¥Hf¬O¤@­Ó¼Æ¦r²Õ¦Xªº¦r¦ê
¦ý¬O¡A§A¤u§@ªíªº¦~¤ë¬O³q¥Î®æ¦¡¡A©Ò¥H³Q»{¬°¬O¼Æ値
©Ò¥H§PÂ_¦¡¼Æª½¬O¤£¥i¯à¸ò¦r¦ê¬Ûµ¥
¬G¦¹±Nf¨Ï¥ÎVAL¨ç¼ÆÂର¼Æ­È§Y¥i
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 11# Hsieh


Hsieh¤j¡A©êºp¤S¨Ó¥´ÂZ¤F....

¥i¥H¨Ï¥Î¤§«á¡A§ÚÁÙ·Q¦A¥[¤@­Ó¡u¿é¤J©M¬ù¤ë¥÷¡vªº¹ï¸Ü®Ø¡A³o¼Ë¥i¥H¿ï¾Ü»Ý­n¬D¥Xªº¤ë¥÷

§Ú¬O³o¼Ë¼gªº

    f = Application.InputBox(prompt:="½Ð¿é¤J¦X¬ùµ²ºâ¤ë¥÷(®æ¦¡¡Gyyyymm)")
µM«á¦b¬D¨ú¸ê®Æªº®É­Ô

If Sheets("data").Cells(i, 3).Value = f

¥i¬O¦n¹³excel»{¤£¥X¨Ó³o­Ó f  ¡A©Ò¥H§ÚµLªk§â¸ê®Æ¬D¿ï¥X¨Ó¡A¥i§_½Ð°Ý±z¬°¤°»ò¶Ü¡H

½Ð±z°Ñ¦Òªþ¥ó¡A·PÁÂ:D

test.rar (223.79 KB)
§Ú·R³Â»¶®a±Ú°Q½×°Ï¡I¡I

TOP

¦^´_ 11# Hsieh


    ·P¿E¤j¤j....¤@¤ÁOK¤F¡I¡I:D
§Ú·R³Â»¶®a±Ú°Q½×°Ï¡I¡I

TOP

¦^´_ 10# j1221
À³¸Ó¬OSELECTªº°ÝÃD
  1.     With Sheets("data")
  2.                 .Cells(1, 1).EntireRow.Copy
  3.                 Sheets.Add After:=Sheets("data")
  4.                 ActiveSheet.Cells(1, 1).PasteSpecial
  5.                 ThisWorkbook.ActiveSheet.Name = c & op
  6.    End With
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 9# Hsieh


Hsieh¤j¡A©êºp¤S¦³°ÝÃD¤F.....³o¦¸°ÝÃD¥X¦b§Ú¶]§¹d=1¡A¶i¤Jd=2®É¡C¦b

    With Sheets("data")
                Cells(1, 1).EntireRow.Select
                Selection.Copy
                Sheets.Add After:=Sheets("data")
                ActiveSheet.Cells(1, 1).PasteSpecial
                ThisWorkbook.ActiveSheet.Name = c & op
   End With

¥X²{¡uClass RangeªºSelect ¤èªk¥¢±Ñ¡vªº°T®§¡A¬°¤°»ò²Ä¤@°é¨S¦³°ÝÃD¡A²Ä¤G°éªº®É­Ô´N·|¥X¨Ó¿ï¾Ü¿ù»~¡H¡H·PÁ±z
§Ú·R³Â»¶®a±Ú°Q½×°Ï¡I¡I

TOP

¦^´_ 8# j1221


    ActiveChart.SeriesCollection(1).XValues = "='" & c & op & "'!R2C1:R22C1"
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 7# Hsieh

Hsieh¤j©êºp¡A½Ð°Ý¦bø»s¹Ïªí¸Ì­±ªº³¡¥÷¸Ó«ç»ò§ï¡H¤ñ¦p»¡³o­Ó¡H

ActiveChart.SeriesCollection(1).XValues = "='c & op'!R2C1:R22C1"
§Ú·R³Â»¶®a±Ú°Q½×°Ï¡I¡I

TOP

¦^´_ 6# j1221


    Sheets(c & op).Cells(i, 1).PasteSpecial
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 5# Hsieh


Hsieh¤j·P®¦¡A¤S¾Ç¨ì¤@¼ËªF¦è¡C¥i§_¦A½Ð±Ð±z¦p¦ó«ü©w¤u§@ªíªº°ÝÃD¡C§Ú¥ý©w¸q¤F¨â­ÓÅܼÆc ©M op¡Ac ¬°¼Æ¦r¡Aop¬°¤å¦r
¡CµM«á§Ú§Q¥Î ThisWorkbook.ActiveSheet.Name = c & op ©R¦W¥Ø«eªº¤u§@ªí¡C¦ýª¾«á§Ú·Q­n¦A«ü©w³o­Ó¤u§@ªí®É¸Ó¦p¦ó«ü©w¡H

§Ú¬O¥Î Sheets("c & op").Cells(i, 1)....
   
·Ð½Ð±z°Ñ¦Òªþ¥ó¡A¦bModule 1ªº¦C32¡A·PÁ¡C:D

test1.rar (170.74 KB)
§Ú·R³Â»¶®a±Ú°Q½×°Ï¡I¡I

TOP

        ÀR«ä¦Û¦b : ¥@¤W¦³¨â¥ó¨Æ¤£¯àµ¥¡G¤@¡B§µ¶¶ ¤G¡B¦æµ½¡C
ªð¦^¦Cªí ¤W¤@¥DÃD