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

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

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

¥»©«³Ì«á¥Ñ t8899 ©ó 2014-4-7 14:34 ½s¿è

Sub Ma3333()
Dim a As String
set a=v:\program\supertsc" & "\" & Format(Date, "eemmdd)
Workbooks.Open Filename:="a - 5 & ".xls"
"a - 5 & ".xls".Activate

End Sub
¥t¥~¤@­Ó°ÝÃD
Sub Macro2()
for k=1 to 15
On Error Resume Next
Workbooks.Open Filename:="v:\program\supertsc" & "\" & Format(Date, "eemmdd")-k & ".xls"
  next
123:
End Sub
1.°²¦p¶}ªºÀɮצs¦b«h¸õ¨ì123ªº»yªk¬O???
2¥u¯à¶}¨ì 1030401 , ±µ¤U¬O 1030399  ¤£¬O 1030331??

¦^´_ 11# t8899
  1. Option Explicit
  2. Sub Ex()
  3.     Dim S As String
  4.     S = Dir("C:\*.xls")   '¶Ç¦^¦r¦ê: °ÆÀɦW¬°xlsªºÀÉ®×
  5.     Do While S <> ""
  6.         If S Like "1030415*" Then MsgBox S
  7.         S = Dir            'Ä~Äò¨Ì¤W¤@¦¸ªº±ø¥ó, ¶Ç¦^¦r¦ê: °ÆÀɦW¬°xlsªºÀÉ®×
  8.     Loop
  9. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_  t8899
GBKEE µoªí©ó 2014-4-8 07:48

ÁÂÁ¡A§Úªº°ÝÃDÀ³¸Ó§ï¦¨
§Ú·Q§äC ®Ú¿ý¤UªºÀÉ®× (¥u¦³®Ú¥Ø¿ý)
ÀɦW¬°1030415.xls
¥]¬A 1030415«á­±³£ºâ (°ÆÀɦW­­xls)
¨Ò¦p
1030415a.xls
1030415b.xls
1030415123b.xls
....
§ä¨ì«á¦A¶}ÀÉ,¤£ª¾¦¹µ{§Ç¦p¦ó¼g?

TOP

¦^´_ 9# t8899
  1.    Dim K As Integer, B As String
  2.     For K = 0 To 0
  3.     B = "v:\program\supertsc" & "\" & 1030403 - K & "?????" & ".xls" '§¹¾ãªº¸ô®|ÀɮצWºÙ
  4.     '½Ð§A¥²¶·ª¾¹D  1030403 - K & "?????" & ".xls" <> 1030403ª`·N¦³°ÝÃD.xls
  5.         [o1] = B
  6.          MsgBOX Dir(B)   '¥iª¾Àɮ׬O§_¦s¦b
  7.          If Dir(B) <> "" Then
  8.       Workbooks.Open Filename:=B
  9.        end if
  10.         next

  11. ÀɦW¬° 1030403ª`·N¦³°ÝÃD.xls
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ t8899 ©ó 2014-4-8 06:51 ½s¿è
¦^´_  t8899 ·í«eªº©Ò¦b¥Ø¿ý¨S¦³³oÀÉ®×,·|¦³À³¥Îµ{¦¡©Îª«¥ó©w¸q¿ù»~ÀɮצWºÙªº«á­±¦³¦h¾lªº¤]¥[¤J²Å¦X±ø¥óªº ...
GBKEE µoªí©ó 2014-4-7 20:33

    Dim K As Integer, B As String
    For K = 0 To 0
    B = "v:\program\supertsc" & "\" & 1030403 - K & "?????" & ".xls" '§¹¾ãªº¸ô®|ÀɮצWºÙ
        [o1] = B
         If Dir(B) <> "" Then
      Workbooks.Open Filename:=B
       end if
        next

ÀɦW¬° 1030403ª`·N¦³°ÝÃD.xls
ÀˬdÀɮצ³¹L
¦ý¶}ÀɹL¤£¤F ?

TOP

¦^´_ 7# t8899
Set ->«ü©wÅܼƬ°ª«¥ó
  1. Set A = Workbooks.Open("v:\program\supertsc\" & Format(Date, "eemmdd"))
½Æ»s¥N½X
Workbooks.Open ¬O¶}±ÒÀɮתº«ü¥O
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_  t8899 ·í«eªº©Ò¦b¥Ø¿ý¨S¦³³oÀÉ®×,·|¦³À³¥Îµ{¦¡©Îª«¥ó©w¸q¿ù»~
GBKEE µoªí©ó 2014-4-7 20:33

¬°¦óset «ü¥O´N·|°õ¦æ¶}±Òªº°Ê§@?(ÁÙ¨S¯u¥¿°õ¦æopen)

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-4-7 20:53 ½s¿è

¦^´_ 4# t8899
  1. Format(Date - k, "eemmdd")
½Æ»s¥N½X
·í«eªº©Ò¦b¥Ø¿ý¨S¦³³oÀÉ®×,·|¦³À³¥Îµ{¦¡©Îª«¥ó©w¸q¿ù»~
  1. MsgBox CurDir  '·í«eªº©Ò¦b¥Ø¿ý
  2. Workbooks.Open Filename:="a - 5.xls"
  3. 'Workbooks.Open Filename:="§¹¾ã¸ô®|ÀɮצWºÙ.xls"
½Æ»s¥N½X
ÀɮצWºÙªº«á­±¦³¦h¾lªº¤]¥[¤J²Å¦X±ø¥óªº§PÂ_¡A­n«ç»ò§ï?
  1. Option Explicit
  2. Sub Ex()
  3.     Dim k
  4.     k = "1030407.xls"
  5.     If k Like "#######.xls" Then MsgBox k   '# ->¼Æ¦r
  6.     k = "1030407.xls"
  7.     If k Like "######.xls" Then MsgBox k    '? ->¦r¤¸
  8.     k = "1030407 adef.xls"
  9.     If k Like "####### ????.xls" Then MsgBox k
  10.     k = "1030407 adef.xls"
  11.     If k Like "####### ???.xls" Then MsgBox k
  12.     k = "1030407 bf.xls"
  13.     If k Like "####### ??.xls" Then MsgBox k
  14.     k = "1030407 bf.xls"
  15.     If k Like "####### ???.xls" Then MsgBox k
  16. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ t8899 ©ó 2014-4-7 20:40 ½s¿è
¦^´_  t8899
GBKEE µoªí©ó 2014-4-7 15:58
A = "v:\program\supertsc" & "\" & Format(Date, "eemmdd") - k & ".xls"  '§¹¾ãªº¸ô®|ÀɮצWºÙ
    If Dir(A) <> "" Then

ÀɮצWºÙªº«á­±¦³¦h¾lªº¤]¥[¤J²Å¦X±ø¥óªº§PÂ_¡A­n«ç»ò§ï?
¤S­n¦p¦ó¶}±Ò¥¿½TªºÀɮצWºÙ?
1030407.xls
1030407adef.xls
1030407bf.xls

TOP

¦^´_  t8899
GBKEE µoªí©ó 2014-4-7 15:58


Set A = Workbooks.Open("v:\program\supertsc\" & Format(Date, "eemmdd")) ¦¹¦æ°õ¦æ§¹´N·|¶}±ÒÀÉ®×1030407.XLS
¾É­P¤U¤@¦æ Workbooks.Open Filename:="a - 5.xls"
¥X°ÝÃD==>"À³¥Îµ{¦¡©Îª«¥ó©w¸q¿ù»~??

TOP

        ÀR«ä¦Û¦b : ¤@­Ó¯Ê¤fªºªM¤l¡A¦pªG´«¤@­Ó¨¤«×¬Ý¥¦¡A¥¦¤´µM¬O¶êªº¡C
ªð¦^¦Cªí ¤W¤@¥DÃD