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

¦p¦óŪ¨ú¦h¼ÆEXCELÀɮפ¤¦P¤@¦Cor¦æªº¼Æ¾Ú¨Ã¶i¦æ¤ÀªR

¦p¦óŪ¨ú¦h¼ÆEXCELÀɮפ¤¦P¤@¦Cor¦æªº¼Æ¾Ú¨Ã¶i¦æ¤ÀªR

¦U¦ì¥ý¶i¦n¡A¤p§Ì¤§«e¬ã²ß¹LC++µ{¦¡¡A¦]¬°¹ï©óVBA­¿·P¿Ë¤Á¡F¥ý«eÂÇ¥Ñ"¿ý»s¥¨¶°"¤gªk·Ò¿ûªº¾Ç²ß¡A¤£¹Lê©ó«Ü¦h«ü¥O¦WºÙ¤£¼ô±x¡A¤S­WµL³~®|¤Jªù¡A©Ò¥H·Q¦b¦¹©M¤j®a½Ð±Ð¡G

§Ú·Q­n³]©w¤@­Ó¥¨¶°¥i¥H¸õ¥Xµøµ¡«ü©w¸ê®Æ§¨¡A¨Ã§â¸ê®Æ§¨¤º©Ò¦³EXCELÀɮפ¤¦P¤@¦C©Î¬O¦P¤@¦æªº¼Æ¾Ú¾ã²z¨ì·sªº¬¡­¶Ã¯¤¤¡G
¸ê®Æ§¨¤ºÀɮ׬O¦³³W«ß©Êªº¡AP.S "ABCDE-Eng-ABC123.1-01.XLS" , "ABCDE-Eng-ABC123.1-02.XLS" , "ABCDE-Eng-ABC123.1-03.XLS" .......¼Æ¶q¤£¤@

½Ð°Ý­n¥Î¬Æ»ò«ü¥O¦bVBA¤¤¹ê²{©O?
ÁÂÁ¡ã

¥»©«³Ì«á¥Ñ hugh0620 ©ó 2015-1-21 17:37 ½s¿è

¦^´_ 1# shauefu

VBA¡A¤À¬q¸¨¼g¡G
1.  ¥ý¼g¥X¦p¦ó«ü©w¸ê®Æ§¨
2.  Åª¨ú¨ä¤¤¤@­ÓEXCEL¤¤ªº¸ê®Æ
     ¤U­±½d¨Ò¦¡«ü©w¸ê®Æ§¨¨ä¤¤¤@­Óexcel±N¸ê®Æ¶K¨ì¥Ø¼Ðexcel¤¤
  1. Private Sub CommandButton2_Click() '¶×¥X¸ê®Æ
  2. Application.ScreenUpdating = False

  3. patch = Application.GetOpenFilename("Microsoft Excel ¬¡­¶Ã¯ (*.xls), *.xls")    'ÂI¿ïÀÉ®×

  4. If patch = False Then
  5.     Exit Sub
  6. Else
  7.      Workbooks.Open (patch)                                                      '¶}±ÒÀÉ®×
  8.     '¶×¤J·s¸ê®Æ
  9.     ActiveWorkbook.Sheets(2).Select
  10.     Sheets(2).Range("A3:M3").Select
  11.     Sheets(2).Range(Selection, Selection.End(xlDown)).Copy ThisWorkbook.Worksheets.Item(4).Range("A1").End(xlDown).Offset(1, 0)
  12.     ActiveWorkbook.Close 0
  13. End If
  14. Application.ScreenUpdating = True
  15. End Sub
½Æ»s¥N½X
3.  ³Ì«á¡Arun¾ã­Ó¸ê®Æ§¨¤¤ªºexcel¡AŪ¨ú¨C¤@­Óexcel¯S©w¦ì¸mªº¸ê®Æ¡C
      ¤U­±¦¡®×¨Ò°w¹ï¦P¤@­Óexcel¤¤sheetªº§R°£¡A¥Î¬Û¦Pªº¤è¦¡¥i¥H¶]¨C¤@­ÓexcelÀÉ
  1. Private Sub CommandButton2_Click() '§R°£
  2.     Dim Sh As Worksheet
  3.     Application.DisplayAlerts = False
  4.     For Each Sh In Sheets
  5.         If Sh.Name <> "Data¶×¾ã" And Sh.Name <> "­ì©lData" Then Sh.Delete
  6.     Next
  7.     Application.DisplayAlerts = True
  8. End Sub
½Æ»s¥N½X
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

·PÁ¦^ÂСA§Ú·|¬ã¨s¬Ý¬Ý¡A·P¿E¤£ºÉ!

TOP

        ÀR«ä¦Û¦b : ¦³¤ß´N¦³ºÖ¡A¦³Ä@´N¦³¤O¡A¦Û³yºÖ¥Ð¡A¦Û±oºÖ½t¡C
ªð¦^¦Cªí ¤W¤@¥DÃD