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

[µo°Ý] ½Ð±Ð¤@¤U¦¹¥y¥¨¶°¿ù»~¦p¦ó§ï?

GBKEE µoªí©ó 2014-4-7 15:58
2¥u¯à¶}¨ì 1030401 , ±µ¤U¬O 1030399  ¤£¬O 1030331  ****¬Ý¤£À´???

·íK=8 ¶Ç¦^¬O v:\program\supertsc\1030399.xls
¤£¬O v:\program\supertsc\1030331.xls ??

TOP

¦^´_ 1# t8899
  1. Option Explicit
  2. Sub Ma3333()
  3.     Dim A As Workbook
  4.     Set A = Workbooks.Open("v:\program\supertsc\" & Format(Date, "eemmdd"))
  5.     Workbooks.Open Filename:="a - 5.xls"
  6.     'Workbooks.Open Filename:="a - 5" & ".xls"  '©Î¬O
  7.     Workbooks("a - 5" & ".xls").Activate
  8.     'Workbooks("a - 5.xls").Activate            '©Î¬O
  9. End Sub
  10. Sub Macro2()  '1.°²¦p¶}ªºÀɮצs¦b«h¸õ¨ì123ªº»yªk¬O???
  11.     '2¥u¯à¶}¨ì 1030401 , ±µ¤U¬O 1030399  ¤£¬O 1030331  ****¬Ý¤£À´???
  12.     Dim k As Integer, A As String
  13.     For k = 1 To 15
  14.     A = "v:\program\supertsc" & "\" & Format(Date, "eemmdd") - k & ".xls"  '§¹¾ãªº¸ô®|ÀɮצWºÙ
  15.     If Dir(A) <> "" Then   'Àɮצs¦b«h Dir(A)¶Ç¦^ ÀɮצWºÙ
  16.         Workbooks.Open A
  17.         Exit For   'Â÷¶}¦^°é
  18.         ' GoTo 123 '©Î¬O ¨ì 123
  19.     End If
  20.   Next
  21. 123:
  22. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¡i»X½ªªº¦Û¥Ñ¡j¤H±`¦b¤°»ò³£¥i¥H¦Û¥Ñ¦Û¦bªº®É­Ô¡A«o³Q³oºØÀH¤ß©Ò±ýªº¦Û¥Ñ»X½ª¡AµêÂY®É¥ú¦Ó²@µLıª¾¡C
ªð¦^¦Cªí ¤W¤@¥DÃD