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

[µo°Ý] ¤U­Ó¤ë·sÀÉ

¦^´_ 2# luhpro
lRow = .Cells(Rows.Count, 1).End(XlUp).Row    ' 1 ªí¨ú±o A Äæ³Ì¥½¦³¸ê®Æ¦C¸¹
³o­ÓÀɧڬã¨s¤F«Ü¦h¤Ñ¤F,ÁÙ¬O¼g¤£¥X«á­±ªºµ{¦¡¡A¤£ª¾¹D¦p¦ó®M¥Î¨ì

2. ¦Û°Ê°»´ú°Ó«~.xlsxªº¦C¼Æ(°Ó«~.xlsx·|¦³³Ì·sªº²£«~¸ê®Æ,¦Ó¥B¦C¼Æ·|¦³¼W¥[¤Î´î¤Öªº¥i¯à©Ê)
¦]¬°¥¦°»´ú¨ì "­¸¤ñ_·x·x.´ò¤f.xlsx/ BF-QOO.xlsx"ªº¦C¼Æ«áÁÙ­n»P¨Ó·½ÀÉ °Ó«~.xlsx¤ñ¹ï,¦C¼Æ¬O¦hÁÙ¬O¤Ö?
¨Ì"°Ó«~.xlsx"ªº¦C¼Æ¬°·Ç,
¦hªº¦C¼Æ.....§â¦h¥X¨Óªº§R°£
¤Öªº¦C¼Æ.....§â¤£¨¬ªº¦C¼Æ·s¼W
³Ì«á§â"°Ó«~.xlsx" ªº³o¤TÄæ "®Æ¸¹        ¤J¼Æ        °Ó«~¦WºÙ"ªº­È(¤£­n®æ¦¡)
copy¨ì ¥Øªº¸ê®Æ§¨ªºÀÉ®×(¥Ø«e¬O "­¸¤ñ_·x·x.´ò¤f.xlsx/ BF-QOO.xlsx")

TOP

¥»©«³Ì«á¥Ñ luhpro ©ó 2019-11-29 21:26 ½s¿è
Dear,
...
1. ¦Û°Ê°»´ú°Ó«~.xlsx¬O§_¤w¶}±Ò,¤w¶}«h©¿²¤,¥¼¶}«h¥´¶}...
PJChen µoªí©ó 2019-11-26 00:04

¥ý¸Ñ¨M§Aªº²Ä¤@­Ó°ÝÃD,
¦b§Aµoªº¨º¦ê : [µo°Ý] ¦Û°Ê®Mªí 5# ²Ä 5 ½g¸Ì,
§Úªº¦^¤å¸Ì¦³¤@¬q´N¬O¦b³B²z§A³o­Ó»Ý¨D :
  1. sPath = ThisWorkbook.Path ' ¦pªG­n«ü©w¥Ø¿ý, ¥u­n§ï¦¨¸Ó¥Ø¿ý§Y¥i, ¦p sPath = "D:"
  2.    sFlName = "°Ó«~.xlsx"
  3.    bMatch = False ' Àˬd '°Ó«~.xlsx' Àɮ׬O§_¤w¶}±Ò
  4.   For iI = 1 To Workbooks.Count
  5.      If Workbooks(iI).Name = sFlName Then
  6.        bMatch = True
  7.        Exit For
  8.      End If
  9.    Next iI
  10.    If bMatch Then
  11.      Set wsTar = Workbooks(sFlName).Sheets("­¸¤ñ°Ó«~")  ' Àɮפw¶}±Ò, ª½±µ¨ú¥Î
  12.      wsTar.Activate
  13.    Else
  14.      Set wsTar = Workbooks.Open(Filename:=sPath & "\" & sFlName).Sheets("­¸¤ñ°Ó«~")  ' Àɮש|¥¼¶}±Ò, ¶}±Ò«á¨ú¥Î
  15.    End If
  16.    With wsTar
  17.   ....
  18.   End With
½Æ»s¥N½X
¨ú¥Î®É¥u­n¦b With wsTar  »P End With ¨â¦æ¶¡¥Î . ¶}ÀYªº«ü¥O§Y¥i,
¨Ò¦p :    .[A5] = 16   ©Î   .Cells(3,5)=2    ...µ¥

2. ¦Û°Ê°»´ú°Ó«~.xlsxªº¦C¼Æ(°Ó«~.xlsx·|¦³³Ì·sªº²£«~¸ê®Æ,¦Ó¥B¦C¼Æ·|¦³¼W¥[¤Î´î¤Öªº¥i¯à©Ê)

³Ì¥½¦C¸¹¥i¥H¥ÎÃþ¦ü
  1.   lRow = .Cells(Rows.Count, 1).End(XlUp).Row    ' 1 ªí¨ú±o A Äæ³Ì¥½¦³¸ê®Æ¦C¸¹  
½Æ»s¥N½X
¨ú±o
¦³¨Æ¥ý¤U¤F,
¨ä¥¦ªº­Y§Ú¦³®É¶¡¤W¨Ó¦A¤¬¬Û°Q½×.

TOP

        ÀR«ä¦Û¦b : ¬O«D·í±Ð¨|¡AÆg¬ü§@ĵ±§¡C
ªð¦^¦Cªí ¤W¤@¥DÃD