- ©«¤l
- 835
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 915
- ÂI¦W
- 16
- §@·~¨t²Î
- Win 10,7
- ³nÅ骩¥»
- 2019,2013,2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-3
- ³Ì«áµn¿ý
- 2024-11-14
|
¥»©«³Ì«á¥Ñ luhpro ©ó 2011-6-7 00:35 ½s¿è
¨Ì§Aªº»Ý¨D¨Ó¬Ý°ò¥»¤W§ÚÌn°µªº´N¬O :
1. §ä¨ì»Ýn³B²zªºÀÉ®×
2. «Ø¥ß·sªº(©Î§ä¨ì³oÓ) Excel WorkBook
3. ±N¸Ó©u¤TӤ몺Àɮפ¤ªºSheet ·s¼W(Copy)¨ì³oÓ WorkBook
4. µ¹©w¸Ó©uªºÀɮצWºÙ¨Ã¦sÀÉ«áÃö³¬
5. Ä~Äò³B²z¤U¤@ÓÀÉ®×
²Ä 1. Ó¨BÆJ¥i¥H¥Î Dir «ü¥O¨Ó¹F¦¨.
²Ä 2 ~ 4 ªº¨BÆJ§Ú¤j·§¦C¥X¤@¨Ç¨BÆJµ¹§A°Ñ¦Ò :- Dim sSouFile$, sTarFile$
- Dim shSou, shTar
- '°õ¦æ«e½Ð¥ý¦b¤u§@¥Ø¿ý¤U«Ø¥ß¤@Ó Ans ¥Ø¿ý, ¥Î¨Ó¦s©ñÂà´«¹L«áªºÀÉ®×, ¥iÁקK·s«ØªºÀɮפ]³Q Dir ¯Ç¤J³B²z³y¦¨¿ù»~µ²ªG
-
- '³o¸Ì¨Ï¥Î dir «ü¥O§ä¨ì»Ýn³B²zªºÀɮרö}±Ò¥¦, µJÂI³]¦bn Copy ªº Sheet
- '¥H¤U°²³]¸ÓÀɮצWºÙ¤w¸g½á¤©µ¹ sSouFile ¤F, §Y sSouFile = "200101.xls" ¤§Ãþ
- 'sSouFile = "200101.xls"
-
- Application.DisplayAlerts = False
-
- Set shSou = Sheets(1) ' °²³] 200101.xls Àɮפ¤n Copy ªº¬O Sheet(1)
- With shSou
- sTarFile = Left(sSouFile, 4) & Right("0" & Int((Val(Mid(sSouFile, 5, 2)) - 1) / 3) + 1, 2) ' Âà´«¦¨©uÀɦW
- sTarFile = ThisWorkbook.Path & "\Ans\" & sTarFile & ".xls"
-
- .Copy
-
- Set shTar = ActiveWorkbook.ActiveSheet
-
- With shTar.Parent
- shTar.Name = Mid(sSouFile, 5, 2)
- .SaveAs Filename:=sTarFile
- .Close
- End With
- End With
- Application.DisplayAlerts = True
½Æ»s¥N½X ¤Wzµ{¦¡ÁÙ¦³¤@Ó°ÝÃD´N¬O¨CÓÀɮ׳£¥u¦³¤@Ó Sheet,
¦]¬°«ç»ò§â Sheet ·s¼W¨ì¬YÓÀɮפ¤ªº¬YÓSheet«e(©Î«á)±,
³oÂI§ÚÁÙ¨S´ú¸Õ¥X¨Ó. |
|