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

½Ð°Ý°µªk ?AÀɮצ³10000µ§¸ê®Æ¡A­n¿é¥X¦¨5­Ó·sÀÉA1~A5¡A¨C­ÓÀÉ®×2000µ§¸ê®Æ

½Ð°Ý°µªk ?AÀɮצ³10000µ§¸ê®Æ¡A­n¿é¥X¦¨5­Ó·sÀÉA1~A5¡A¨C­ÓÀÉ®×2000µ§¸ê®Æ

¥Ø«eªºª¬ªp¬O¡A5­ÓÀɮ׳£«Ø¥ß¤F¡A¥i¬O¥u¦³²ÄA1¦³2000µ§¸ê®Æ¡AA2~A5³£¬OªÅ¥Õªº¡A½Ð¤j®v¬Ý¤@¤U¨ºùئ³°ÝÃD?
  1. Private Sub rutenexport() '¶×¥X¤W¬[ÀÉ -ÅS¤Ñ

  2. Dim sb, db As Workbook

  3. 'wp = ActiveWorkbook.Path & "\" '«ü©w¦sÀɦì¸m
  4. wp = ActiveWorkbook.Path & "\" & "ruten" & Year(Date) & "-" & Month(Date) & "-" & Day(Date) & "-" & Hour(Time) & "-" & Minute(Time) & "-" & Second(Time) & "\" '«ü©w¦sÀɦì¸m

  5. If Len(Dir(wp, vbDirectory)) = 0 Then
  6.    
  7.    MkDir wp
  8.    
  9. End If


  10. Set sb = Workbooks("¤W¬[¸ê®ÆÂà´«.xlsx")

  11. sb.Sheets("ÅS¤Ñ¤W¬[ÀÉ").Range("AE:XX").Delete

  12. 'sb.Sheets("ÅS¤Ñ¤W¬[ÀÉ").Range("A:A").Delete '§R°£²Ä1¦æ½s¸¹

  13. '================¨C­ÓÀÉ®×2000µ§¸ê®Æ¶×¥XA
  14. For i = 1 To 5

  15. db1 = "ruten_auction2014-" & i & ".xls"

  16. Set NewBook = Workbooks.Add

  17.     With NewBook
  18.         .Title = "All Sales"
  19.         
  20.         .Subject = "Sales"
  21.         
  22.         .SaveAs Filename:=wp & db1
  23.         
  24.     End With
  25.    
  26. Set db = Workbooks(db1)
  27.    
  28. pt = i * 2000

  29. MsgBox db.Name

  30. sb.Sheets("ÅS¤Ñ¤W¬[ÀÉ").Range(Cells(pt - 1999, 1), Cells(pt, 31)).Copy Workbooks(db1).Sheets("sheet1").Range(Cells(pt - 1999, 1), Cells(pt, 31))

  31. 'db.Close

  32. Next i

  33. MsgBox "ÅS¤Ñ¤W¬[Àɤw¶×¥X"
  34. End Sub
½Æ»s¥N½X

³o¨â¥y»yªk¦³ÂI°ÝÃD
sb.Sheets("ÅS¤Ñ¤W¬[ÀÉ").Range(Cells(pt - 1999, 1), Cells(pt, 31)).Copy
Workbooks(db1).Sheets("sheet1").Range(Cells(pt - 1999, 1), Cells(pt, 31))

§A¥J²Ó¦A¬Ý¤@¤UÀɮסAÀ³¸ÓA2~A5¤£¬O¨S¸ê®Æ
¦Ó¬OA2ªº¸ê®Æ¶K¨ì2001~4000¦C
A3¶K¨ì4001~6000¦C¥H¦¹¦C±À¤F
²Ä¤G¥yµ{¦¡½XÀ³¸Ó©T©wÀx¦s®æ´N¦n
¥i¥H§ï¦¨
Workbooks(db1).Sheets("sheet1").Range("A1").select
activate.paste
·N«ä´N¬O¦bA1Äæ¦ì¶K¤W½Æ»sªºÀx¦s®æ¤º®e

TOP

        ÀR«ä¦Û¦b : ¤p¨Æ¤£°µ¡B¤j¨ÆÃø¦¨¡C
ªð¦^¦Cªí ¤W¤@¥DÃD