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

[µo°Ý] ¦p¦ó§ï¼gÅý³o­Óµ{¦¡½X¦bÀH¨­ºÐ¤W¥i¥H°õ¦æ

[µo°Ý] ¦p¦ó§ï¼gÅý³o­Óµ{¦¡½X¦bÀH¨­ºÐ¤W¥i¥H°õ¦æ

Sub ¥´¶}®×§¨¸Ì©Ò¦³ÀÉ®×_¯x§Î3_Click()
Dim mFile As String
mFile = Dir("D:\®à­±\080526\0201\*.XLSx")
Do While mFile <> ""
Workbooks(mFile).Close False
mFile = Dir()
Loop

End Sub

¦^´_ 1# oak0723-1
§â©³¤U³o¨Ç¤å¦r§ï¦¨§AÀH¨­ºÐ­n³B²z¨º¨ÇÀɮתº©Ò¦b¥Ø¿ý,

D:\®à­±\080526\0201\

TOP

°ÝÃD¬O¡K¡K«ç»ò¼g

TOP

¥i¯à§Ú¨S§â§Úªº°ÝÃD¼g²M·¡,©Ò¥HÅý¦U¦ì¥ý¶i»~¸Ñ
§Úªº·N«ä¬O»¡§Ú§â³o­Ó¥¨¶°Àɮצs©ñ¦bÀH¨­ºÐ¤Wªº±ø¥ó¤U,¦p¦ó¦b¥ô·N¹q¸£¤W³£¥i¥H°õ¦æ?
§Úı±o°ÝÃDÀ³¸Ó¬O¦b"D:\®à­±\080526\0201\*.XLSx"¤W
°ÝÃD¬O§Ú¤£ª¾¹D¦p¦ó§ï¼g
¦]¬°¸ô®|·|ÀHµÛ¹q¸£¤£¦P¦Ó¤£¦P

TOP

³o­ÓÀɮתº¸ô®|

¥i¥H¥Î ThisWorkbook.Path ¨ú±o

TOP

Sub ¥´¶}®×§¨¸Ì©Ò¦³ÀÉ®×_¯x§Î3_Click()
Dim mFile As String
mFile = Dir(ThisWorkbook.Path&"\®à­±\080526\0201\*.XLSx")
Do While mFile <> ""
Workbooks(mFile).Close False
mFile = Dir()
Loop

End Sub
-----¦n¹³©Ç©Ç

TOP

¦^´_ 6# oak0723-1

µ{¦¡½X¬Ý°_¨Ó¬OºI¨ú¨ä¤¤¤@¬q,Àɮ׳£¨S¥´¶},´NÃö³¬,©Ò¥H³o¬qµ{¦¡µLªk°µ¤°»ò°Ê§@...»PÀH¨­ºÐµLÃö
µ{¦¡½X¬O¥´¶} "D:\®à­±\080526\0201\"¸Ì­±ªºÀÉ®×...¦b®à­±ªºÀɮפ@¯ë³£¦bC,§Aªº«o¬O¦bD
¥ý¬d¤U¸ô®|¦³¨S¦³¿ù?¦³¿ù§ï¸ô®|§Y¥i¥´¶}ÀÉ®×
µy¥[­×§ï¬°
Sub ¥´¶}®×§¨¸Ì©Ò¦³ÀÉ®×_¯x§Î3_Click()
Dim mFile As String, Path As String
Path = "D:\®à­±\080526\0201\"   '¸ô®|,¤Ö¤F³o¬qÀÉ®×¥´¤£¶}
mFile = Dir(Path & "*.xlsx")  '¸ô®|¤¤ªºÀÉ®×
Do While mFile <> ""
Workbooks.Open(Path & mFile) '¶}±ÒÀÉ®×
...°µ¬Y¨Ç°Ê§@...
Workbooks(Path & mFile).Close False '¤£¦sÀÉ´NÃö³¬
mFile = Dir()
Loop

End Sub

TOP

ÁÂÁ§Aªº¸Ñ´b

TOP

        ÀR«ä¦Û¦b : ¬°¦Û¤v§äÂǤfªº¤H¥Ã»·¤£·|¶i¨B¡C
ªð¦^¦Cªí ¤W¤@¥DÃD