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

[µo°Ý] Excel Àɮ׳Q¨ä¥L¤H¶}±Ò

[µo°Ý] Excel Àɮ׳Q¨ä¥L¤H¶}±Ò

Dear ¤j¤j
§Q¥Î¥Ø«eªºEXCELÀÉ®×(¨Ò¦p:¬¡­¶Ã¯1)¨Ó¶}°_¥t¤@­ÓEXCELÀÉ®×(BB)
Dim A As Workbook, B As Worksheet
Set A = Workbooks.Open(Filename:=ThisWorkbook.Path & "\bb.xlsm")
Set B = A.Sheets("¤u§@ªí1")
Range("A1") = B.Range("A1")
end sub
¦pªG¹J¨ìBBÀɮ׳Q§O¤H¶}±Ò¤¤,´N·|¥X²{°õ¦æ¿ù»~,¦Ó¦Û°Ê¶}±ÒBBÀÉ®×,
µLªk¦AÄ~Äò°õ¦æ¤U­±µ{¦¡,
¬O§_¦³¿ìªk¥i¥H¦b¤£ºÞÀɮ׬O§_¦³³Q¶}±Ò¤¤¤´¥i¥HÄ~Äò°õ¦æ¸Óµ{¦¡.
¨º­n¦p¦ó­×§ï??
ÁÂÁÂ

¦^´_ 1# borshun88


   
´£¨Ñµ¹±z Heish ¤j¤j¤§«e©Òµoªºµ{¦¡½X
°Ñ¦Òºô§}
http://gb.twbts.com/index.php?topic=13181.0

Sub nn()
Dim w As Window, wb As Workbook
Set d = CreateObject("Scripting.dictionary")
For Each w In Windows
¡@ d(w.Caption) = w.Caption
Next
Sheets("new").Select
¡@¡@Rows("1:1").Select
¡@¡@Selection.Copy
If d.exists("new.xls") = False Then Workbooks.Open Filename:="D:\new.xls"
Set wb = Workbooks("new.xls")
wb.Activate
¡@¡@ActiveSheet.Range("A65536").End(xlUp).Offset(1, 0).Select
¡@
¡@¡@Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
¡@¡@:=False, Transpose:=False
¡@¡@Application.CutCopyMode = False
¡@
¡@¡@wb.Save
End Sub

  ¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~

  ¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
  ¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡­n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
  ¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk

  ¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM

TOP

¦^´_ 1# borshun88
On Error ³¯­z¦¡ ±Ò°Ê¤@­Ó¿ù»~³B²z±`¦¡¡A¥B«ü©w¦¹±`¦¡¦b¤@­Óµ{§Çùتº¦ì¸m¡C¤]¥i¥Î¨Ó°±¤î¤@­Ó¿ù»~³B²z±`¦¡¡C
Resume ³¯­z¦¡  ¦b¿ù»~³B²z±`¦¡µ²§ô«á¡A«ì´_­ì¦³ªº°õ¦æ¡C»yªk Resume 0 Resume Next
  1. Option Explicit
  2. Sub Ex()
  3.     Dim A As Workbook, B As Worksheet
  4.     On Error Resume Next
  5.     Set A = Workbooks.Open(Filename:=ThisWorkbook.Path & "\bb.xlsm")
  6.     If Err.Number <> 0 Then
  7.         MsgBox "ÀÉ®×µLªk¶}±Ò"
  8.         Exit Sub
  9.     End If
  10.     Set B = A.Sheets("¤u§@ªí1")
  11.     Range("A1") = B.Range("A1")
  12.    
  13. End Sub
½Æ»s¥N½X

TOP

¦^´_ 3# GBKEE
·PÁÂGBKEE¤j¤jªº¦^ÂÐ
on error resume next ¥i¥H¸Ñ¨M³o°ÝÃD
·P®¦

TOP

        ÀR«ä¦Û¦b : «Ý¤H°h¤@¨B¡A·R¤H¼e¤@¤o¡A´N·|¬¡±o«Ü§Ö¼Ö¡C
ªð¦^¦Cªí ¤W¤@¥DÃD