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

½Ð°Ý¦p¦ó¶}±Ò¨Ì¤é´ÁÀɦW°µ½Æ»s¶K¤W

½Ð°Ý¦p¦ó¶}±Ò¨Ì¤é´ÁÀɦW°µ½Æ»s¶K¤W

½Ð§Ú°²³]§Ú¦³­ÓexcelÀÉ®×  ¡Ga.xls
­n±q¬Y­Ó¸ê®Æ§¨¡]¨Ò¦p D:\123) ¤¤ªºÀÉ®× C4~C100ªº¸ê®Æ½Æ»s ¡AµM«á ¶K¨ìa.xls ªº  B4~B100
¦ýD:\123¤¤ªºÀÉ®× ¬O·|Åܤƪº
¨Ò¦p abc1201 ¬O12¤ë1¤é¥Í¦¨ªºÀÉ
­Y¨ì12/2 ´N·|Åܦ¨abc1202
        12/3 ´N·|Åܦ¨abc1203
´N¬O¨C¤Ñ·|¶K¤@¦¸¨ìa.xls ªº  B4~B100

ChDir "D:\123"
    Workbooks.Open Filename:="D:\abc1202.xls"
    Range("B4").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.Copy
    Windows("a.xls").Activate
     Range("b4").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False


½Ð°Ý­n¦p¦ó­×§ï©O
ÁÂÁÂ
Tony

¦^´_ 1# tonycho33
"D:\abc" & Format(Date, "mmdd") & ".xls"

TOP

¦^´_ 2# ¸­°ê¬w

½Ð°Ý¦pªG§Ú¨C¦¸­n§ì«e¤@¤Ñ¤é´Áªº¸Ü­n¦p¦ó¼g
©Î¬O¥i¸õ¥X¤@­Óµøµ¡¿é¤J¤é´Á´X¤ë´X¸¹?
ÁÂÁÂ
Tony

TOP

¦^´_ 3# tonycho33

½Ð°Ý¤@¤U§Ú·Q¨C¦¸§ì¨ú¡y«e¤@¤Ñ¤é´ÁªºÀɦW¡z
¨Ò¦p¤µ¤Ñ¬O12/22
§ÚÀÉ®×­n§ìabc20161221.xls
½Ð°Ý­n¦p¦ó¨Ï¥Î©O

µ{¦¡½X¦n¹³µLªk¹F¨ì¡Ð½Ð¨ó§UÁÂÁÂ
      myday = DateAdd("m", -1, Date)

    Workbooks.Open Filename:="abc" & myday & ".xls"
Tony

TOP

¦^´_ 4# tonycho33

Format(date-1,"yyyymmd")
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¡i°µ¤Hªº¶}©l¡j¨C¤@¤Ñ³£¬O¬G¤Hªº¶}©l¡A¨C¤@­Ó®É¨è³£¬O¦Û¤vªºÄµ±§¡C
ªð¦^¦Cªí ¤W¤@¥DÃD