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

[µo°Ý] ½Ð°Ý1¨Ç·h²¾ªº°ÝÃD

[µo°Ý] ½Ð°Ý1¨Ç·h²¾ªº°ÝÃD

¥»©«³Ì«á¥Ñ mark15jill ©ó 2011-5-18 09:30 ½s¿è

¦]¸ê®Æ¤Ó¦h ¦pªG¤@µ§¤@µ§ºCºC·h²¾ ·|¤â¼o±¼= =!!
¬G°µ¤F¤@­Ó¤ñ¹ïªí ©M¤@­Ó«ö¶s ·Q½Ð°Ý»¡ ¯à§_§Ë­ÓVBA ±N·Q­nªº¸ê®Æ ·h²¾¨ì·Q­nªº¸ê®Æ§¨¦WºÙ...

»Ý¨D²©ö»¡©ú
1.À£ÁYÀɤº¦³  »Ý¨D»¡©ú¤å¥ó  ¤ñ¹ïªí  EXCEL¦s©ñ°Ï ©M ¸ê®Æ§¨¦s©ñ°Ï ¨â­Ó¸ê®Æ§¨
    ¦Ó¦b EXCEL¦s©ñ°Ï¤º ¦³13¥÷EXCELÀÉ®×   ¸ê®Æ§¨¦s©ñ°Ï¤º ¦³ 13­Ó¸ê®Æ§¨

2.·Q½Ð°Ý»¡ ¯à§_¦b¤ñ¹ïªí¤º ªº ·h²¾ «ö¶s«ö¤U®É­Ô
    ¨Ì·Ó ¤ñ¹ïªí¤ºªº TEXTbox ¤º®e ±N EXCEL¦s©ñ°Ï¤ºªºÀÉ®× ©ñ¸m¸Ó¥Ø¿ý¤Uªº ¸ê®Æ§¨¦WºÙ
    ¦p  TEXTBOX¤º®e¬° (D:\90¦~«×\) «ö¤U·h²¾«á  EXCELÀÉ®× (90¦~«×-001 ) ·|·h²¾¨ì D:\90¦~«×\90¦~«×-001-¤ý1 ªº¸ê®Æ§¨¤º


Àɮתþ±a©ó¦¹   (479K¤~¬O¥¿½Tªº£¾£¾  ¥t¥~¤@­Ó¬O»~¶Ç)
[attach]6158[/attach]

¯à.rar (479.29 KB)

¦^´_ 1# mark15jill


    +.+  ¬O§Úªí¹F¤£°÷²M·¡¶Ü

TOP

¦^´_ 2# mark15jill
Name³¯­z¥y­«·s©R¦WÀɮרñN¤§²¾¨ì¤@­Ó¤£¦Pªº¥Ø¿ý©Î¸ê®Æ§¨¤¤¡C¦p¦³¥²­n¡AName¥i¸ó¶VºÏºÐ¾÷²¾°ÊÀɮסC¦ý·ínewpathname©Moldpathnamebut³£¦b¬Û¦PªººÏºÐ¾÷¤¤®É¡A¥u¯à­«·s©R¦W¤w¸g¦s¦bªº¥Ø¿ý©Î¸ê®Æ§¨¡CName¤£¯à«Ø¥ß·sÀɮסA¥Ø¿ý©Î¸ê®Æ§¨¡C
¨Ï¥Î Name «ü¥O¦b¤@­Ó¤w¶}±ÒªºÀɮפW¡A±N·|²£¥Í¿ù»~¡A·Q­n§ïÅܤ@­Ó¤w¶}±ÒÀɮתº¦WºÙ¤§«e¡A§A¥²¶·¥ýÃö³¬¥¦¡AName ¤Þ¼Æ¤£¯à¥]¬A¸U¥Î¦r¤¸ ( * ©M ? )¡C
  1. Sub Ex()
  2.     Dim TheFile$, A$, F$
  3.     For Each e In Range("G2", [G2].End(xlDown))
  4.         TheFile = ThisWorkbook.Path & "\" & "excel¦s©ñ°Ï\" & e & ".xls"
  5.         A = Dir(TheFile)
  6.         If A <> "" Then
  7.             F = ThisWorkbook.Path & "\" & "¸ê®Æ§¨¦s©ñ°Ï\" & e(1, 2)
  8.             Name TheFile As F & "\" & A
  9.         End If
  10.     Next
  11. End Sub
½Æ»s¥N½X

TOP

¦^´_ 3# GBKEE


    ª©¤j  ¨º¨Çµ{¦¡ªº¸Ü ¬O¥u¯à­­©w©ó ¦PºÏºÐ¶Ü??(¦p C ¹ï C )
ÁÙ¬O»¡ ¥i¥H¤£¦PºÏºÐ°Ï???
¦]¬°¦pªG¬O¦PºÏºÐ°Ï¥i¦æªº¸Ü ¨º´N¤£¥Î§â¤ñ¹ïªí·h²¾¹L¥h
¦pªG¤£¥i¦æªº¸Ü ¨º´N±o·h²¾¹L¥h¤F

TOP

¦^´_ 4# mark15jill
¦]¬°¦pªG¬O¦PºÏºÐ°Ï¥i¦æªº¸Ü ¨º´N¤£¥Î§â¤ñ¹ïªí·h²¾¹L¥h,¦pªG¤£¥i¦æªº¸Ü ¨º´N±o·h²¾¹L¥h¤F
¬Ý¤£À´§Aªº·N«ä
Name   "D:\TEST.XLS"  As   "C:\TEST1.XLS"   
¬O¥i¦æªº

TOP

¦^´_ 5# GBKEE


    ´N¬O¨º­Ó·N«ä....  ÁÂÁªO¤j
¦]¬°±`±`¬°¤F­n·h²¾¤W¤d­ÓÀÉ®×  ¦Ó¾É­P²´ªá¼º¶Ã= =!! ¤â·¥«×µmµh

TOP

¥»©«³Ì«á¥Ñ mark15jill ©ó 2011-5-18 10:41 ½s¿è

¦^´_ 5# GBKEE


  ¤j¤j ¤£¦n·N«ä ¦³ÂI¤p°ÝÃD£¾£¾!!!
¦pªG¸I¨ì«D³sÄòªº¸ê®Æ
¦p (¸¹½X1 3 4 7 8 9 10 11 15 19 20 ) Ãþ¦ü³o¼Ë


´N·|¨S¦³°ÊÀR

TOP

¦^´_ 7# mark15jill
  1. Sub Ex()
  2.     Dim E As Range, TheFile$, A$, F$
  3.     For Each E In Range("G2", Cells(Rows.Count, "G").End(xlUp))
  4.         If E <> "" Then
  5.             TheFile = ThisWorkbook.Path & "\" & "excel¦s©ñ°Ï\" & E & ".xls"
  6.             A = Dir(TheFile)
  7.             If A <> "" Then
  8.                 F = ThisWorkbook.Path & "\" & "¸ê®Æ§¨¦s©ñ°Ï\" & E(1, 2)
  9.                 Name TheFile As F & "\" & A
  10.             End If
  11.         End If
  12.     Next
  13. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ mark15jill ©ó 2011-5-18 11:55 ½s¿è

¦^´_ 8# GBKEE
¥Ø«e §Úªº¤è¦¡ ¬O

123
-¤ñ¹ïªí
-excel¦s©ñ°Ï(GÄdªº¸ê®Æ) <¦³187µ§>
        89¦~«×-002
      89¦~«×-004
      89¦~«×-027
-¸ê®Æ§¨¦s©ñ°Ï(HÄæ¦ì¸ê®Æ) <¦³187µ§>
      89¦~«×-002-¤ý1
     89¦~«×-004-¤ý4
     89¦~«×-027-¤ý27

¦ý¬O  ¶]¨ì³o¦æªº®É­Ô ·|¥X²{ ¥H¤U¹Ï¤ù°T®§
    Name TheFile As F & "\" & A



¿ù»~°T®§.jpg

TOP

¦^´_ 9# mark15jill
½Ð¬d¬Ý vbaªº»¡©ú  ¿ù»~ªºÀɮצWºÙ©Î¼Æ¥Ø (¿ù»~ 52)
Àˬd ¬Ý¬Ý§A¦³¥Ç¨ì¨º¸Ìªº¿ù»~

TOP

        ÀR«ä¦Û¦b : µÊ®ð¼L¤Ú¤£¦n¡A¤ß¦a¦A¦n¤]¤£¯àºâ¬O¦n¤H¡C
ªð¦^¦Cªí ¤W¤@¥DÃD