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

[µo°Ý] ¦³Ãö¶}±ÒÂÂÀÉ«á¸ü¤JÀÉ®×

[µo°Ý] ¦³Ãö¶}±ÒÂÂÀÉ«á¸ü¤JÀÉ®×

¦U¦ì«e½ú¡A²{¦b¦]¤u§@¤W»Ý­n

§Ú¦b a.xls ¤À­¶1¡A©ñ­Ó«ö¶s
ÂI¥L¥i¥H¶}±ÒÀɮסA¬d¾\®Ñ¤W¦³­Ó©R¥O¥i¥Î
     Application.Dialogs(xlDialogOpen).Show "*.xls"
³o¥i¥H¸õ¥X¹ï¸Üµøµ¡¿ï¨ú§Ú­nªºÀÉ®×

°ÝÃD¨Ó¤F¡A°²¨Ï§Ú¶}±Ò¤F b.xls

§Ú­n¦p¦ó¶}±ÒÀɮ׫᪽±µ±N b.xls ªº¤u§@­¶©ñ¨ì a.xls ªº³Ì«á­¶??

¦Ó¤£¬O¤S¶}¤@­Ó·sÀÉ~
½Ð«e½úÀ°¦£¸Ñ´b~ÁÂÁÂ

¦U¦ì«e½ú¡A²{¦b¦]¤u§@¤W»Ý­n

§Ú¦b a.xls ¤À­¶1¡A©ñ­Ó«ö¶s
ÂI¥L¥i¥H¶}±ÒÀɮסA¬d¾\®Ñ¤W¦³­Ó©R¥O¥i¥Î
   ...
a703130 µoªí©ó 2012-8-21 18:43
  1.     Sub test()
  2.    
  3.     Dim wbNew As Workbook
  4.     Dim result As Boolean
  5.     '§AÀ´ªº
  6.     result = Application.Dialogs(xlDialogOpen).Show("*.xls")
  7.    
  8.     '¦pªG¨ú®ø´N¤U¯Z
  9.     If Not (result) Then
  10.         Exit Sub
  11.     End If
  12.    
  13.     '§ä¥X­è¥´¶}ªºWORKBOOK
  14.     Set wbNew = ActiveWorkbook
  15.    
  16.     '¤@­¶¤@­¶¦a§Û¨ìÂÂWORKBOOK, THISWORKBOOK=ÂÂWORKBOOK
  17.     For Each s In wbNew.Sheets
  18.         s.Copy after:=ThisWorkbook.Sheets(ThisWorkbook.Sheets.Count)
  19.     Next
  20.    
  21.     'Ãö±¼·sWORKBOOK
  22.     wbNew.Close (False)
  23. End Sub
½Æ»s¥N½X
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

¤µ¤éの¤@¬íは  ©ú¤éにない
http://kimbalko-chi.blogspot.com
http://kimbalko.blogspot.com

TOP

¦^´_ 1# a703130
  1. Sub Ex()
  2.     With Application.Dialogs(xlDialogOpen)
  3.         If .Show("*.xls") = True Then     '¦³¶}±ÒÀÉ®×
  4.             With ActiveWorkbook           '¶}±ÒªºÀÉ®×
  5.                 '½Æ»s¥þ³¡¤u§@ªí
  6.                 .Sheets.Copy After:=ThisWorkbook.Sheets(ThisWorkbook.Sheets.Count)
  7.                 .Close (False)            'Ãö³¬:¶}±ÒªºÀÉ®×
  8.                 '¤]¥i¥Î²¾°Ê¤èªk
  9.                 '.Sheets.Move After:=ThisWorkbook.Sheets(ThisWorkbook.Sheets.Count)
  10.             End With
  11.         End If
  12.     End With
  13. End Sub
½Æ»s¥N½X

TOP

¥t¥~¦A½Ð±Ð¤@­Ó°ÝÃD
¬Û¦P¤è¦¡

¦pªG­n¸ü¤J¹Ï¤ù¡A¨Ã¥B¨Ì·ÓÀɮצWºÙ©ñ¤J©T©wÀx¦s®æ¤º
À³¸Ó¦p¦ó°µ??

¨Ò¡A§Ú£¸¤f®ð¿ï¨ú 1~3.png
¸ü¤J«á¡A¦Û°Ê©ñ¦bsheet2 ªº A1¡AA5¡AA11

½Ð«e½ú­Ì¦A¸Ñ´b~ÁÂÁÂ

TOP

        ÀR«ä¦Û¦b : ¤Hªº²´·úªø¦b«e­±¡A¥u¬Ý¨ì§O¤Hªº¯ÊÂI¡Aµ·²@¬Ý¤£¨ì¦Û¤vªº¯ÊÂI¡C
ªð¦^¦Cªí ¤W¤@¥DÃD