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

[µo°Ý] ¿z¿ïÀÉ®×(ªþcode) ³Â·ÐÀ°§Ú¬Ý¤@¤U ÁÂÁÂ(¤w¦Û¤v¸Ñ¨M) codeµy«áªþ¤W

[µo°Ý] ¿z¿ïÀÉ®×(ªþcode) ³Â·ÐÀ°§Ú¬Ý¤@¤U ÁÂÁÂ(¤w¦Û¤v¸Ñ¨M) codeµy«áªþ¤W

¥»©«³Ì«á¥Ñ ffntldj ©ó 2011-12-1 20:17 ½s¿è

¹J¨ì¥H¤U°ÝÃD ¤W¨Ó¸ß°Ý¦U¦ì°ª¤â ½Ð½ç±Ð ÁÂÁÂ

¥H¤U¬O§Ú¼gªºcode (¤w§¹¦¨³¡¤À)
¥D­nªº¥\¯à¬O·Q­n¥h'C:\tool\output\ ¦¹¥Ø¿ý¤U­±¶}¸ÌÀYªº*.XLSÀÉ®×,¦ý¶}±ÒªºÀɮ׶·²Å¦X¥H¤U±ø¥ó
1:ÀɮצWºÙ»Ý­n²Å¦X*ÀɦWÃöÁä¦r* ,Word=[b2] ¶ñ¼g¦bEXCELªí®æ¤¤
2.Sheet¦WºÙ­n²Å¦X"ShName",ShName=[b3]  ¶ñ¼g¦bEXCELªí®æ¤¤


±µ¤U¨Ó¬O§Ú¤£ª¾¹D«ç»ò¼g(¥¼§¹¦¨),·Ð½ÐÀ°­Ó¦£ ÁÂÁÂ
3.¥´¶}Àɮ׫á¦bSheet(Equi)¤¤,·íA+B+CÄæ¦ì¦pªG³£¤@¼Ë
«h±N¦¹¸ê®Æ«O¯d¤@µ§(¦pªþÀÉ2,3¦C),¤]´N¬O§R°£­«½Æªº¸ê®Æ
4.¦bAÄæ¦ì¤¤¥u­n¦³¥]§tFilter1~3ªº¤º®e®É,­n§â¸ê®Æ§R°£(°²³]filter1¼gªº¬O300#3_4MPMTR,«h²Ä¤»¦C¾ã¦C§R°£)
   ¦b'C:\tool\output\ªº¸Ì­±·|¦³¦n´X­ÓÀÉ®× ©Ò¥H°µ§¹¤@­ÓÀÉ®× ´N­nÀx¦s Ãö±¼,µM«á¦b°µ¤U¤@­Ó

¥H¤U¬O¤p§Ìªºcode
Private Sub CommandButton11_click()
Dim sh As Worksheet,NewBK As Workbook
Dim Path$,Word$,ShName$,File$,Tmp$,Filter1$,Filter2$,Filter3$
Path=[b1]     'C:\tool\output\  
Word=[b2]    'ÀɦWÃöÁä¦r
ShName=[b3]  'sheet name (Equi)

Filter1=[b4]
Filter2=[b5]
Filter3=[b6]

File= Dir(Path&"*.xls") '¦¬´MÀÉ®×
if File="" then go to Ex
first =File
Do
   Tmp=left(File,InStrRev(File,".")-1) '¨úÀɮצW
        if InStr(File,Word) Then
      Workbooks.open Path& File
      On Error Resume Next
      Set sh= ActiveWorkbook.Worksheets(ShName)
     On Error GoTo 0
    if Not sh is Nothing Then
     i=i+1
   '¦¹¬q¤£·|¼g'
   sh.Parent.Close False
End If
End If
File= Dir
Loop Until first = File Or File= ""
IF i Then
msgbox i&"µ§²Å¦XÀÉ®×"
else
Newbk.close False
EX: Msgbox "µL²Å¦XÀÉ®×"
End if
End Sub

ScreenHunter_01 Nov. 29 21.44.gif (21.28 KB)

ScreenHunter_01 Nov. 29 21.44.gif

question.rar (1.63 KB)

        ÀR«ä¦Û¦b : ¦n¨Æ­n´£±o°_¡A¬O«D­n©ñ±o¤U¡A¦¨´N§O¤H§Y¬O¦¨´N¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD