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

[µo°Ý] §Ö³tcopy¨Ã­È¤Æ

[µo°Ý] §Ö³tcopy¨Ã­È¤Æ

½Ð°Ý¥H¤Uªºµ{¦¡
¥¦¥i¥H§Ö³tcopy¨C­Ó¤u§@ªí
¦ýcopy«á§Ú­n¥¦¤]¦P®É°µ¼Æ­È¤Æªº°Ê§@¡A¦ý¥¦¥u·|­È¤Æ²Ä¤@­Ó¤u§@ªí
½Ð°Ý­n¦p¦óÅý¥¦­È¤Æ¨C¤@­Ó¤u§@ªí¡H
  1. Sub Qcopy()

  2. Set Wb = Workbooks("¶i¥X¤f½Ð´Ú.2017.xlsx")
  3. Wb.Sheets.Copy
  4. For Each Sh In Wb.Sheets
  5. Sh.Visible = True
  6. Next

  7. For Each Sh In Wb.Sheets
  8. Cells.Select
  9. Selection.Copy
  10. Selection.PasteSpecial xlPasteValues '­È¤Æ
  11. Next
  12. End Sub
½Æ»s¥N½X

¦^´_ 1# PJChen

¥u¦b²Ä¤@­Ó¤u§@ªí¶K¤W­È¡A¬O¦]¬°¨S¦³«ü©w¤u§@ªí¡A©Ò¥H¥u¹ï·í«eªº¤u§@ªí§@¥Î
­n§ï¦¨¤U­±³o¼Ë
  1. For Each Sh In Wb.Sheets
  2. Sh.Cells.Copy
  3. Sh.Cells.PasteSpecial xlPasteValues '­È¤Æ
  4. Next
½Æ»s¥N½X

TOP

  1. Sub zz()
  2. For Each s In Sheets
  3.     With s
  4.         .UsedRange = .UsedRange.Value
  5.     End With
  6. Next
  7. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# naruto018

±z¦n,

¦ý§Ú­ì¥ýªºµ{¦¡¥\¯à¬O¥i¥H±N­ìÀɧֳtªº§¹¥þ½Æ»s¡A
µ{¦¡§@­×§ï«á,½T¹ê¯à°÷±N¨C­Ó¤u§@ªí³£­È¤Æ¡A¦ý¬O¥¦¬O±N­ìÀɭȤơA¦Ó¨S¦³¥t¥~copy¦¨·sÀÉ.

½Ð°Ý¥i¥H¦p¦ó­×§ï¦¨§Ú­nªº¥\¯à¡H

TOP

¦^´_ 3# ikboy

±z¦n,

­ì¥ýªºµ{¦¡¥\¯à¬O¥i¥H±N­ìÀɧֳtªº§¹¥þ½Æ»s¡A
´ú¸Õ¹L±z­×§ïªºµ{¦¡«á,¥¦§¹¥þ¨S¦³¥ô¦ó§ïÅÜ¡A§Ú·Q¬O¦]¬°§Ú­ì¥ýªºµ{¦¡¤¤¦³Dimªº«Å§i,µy§@­×§ï¬°¥H¤U«á,
½T¹ê¯à°÷«Ü§Ö³tªº±N¨C­Ó¤u§@ªí³£­È¤Æ¡A¦ý»P2¼Óªºµ{¦¡¬Û¦P¡A¥¦¥u¬O±N­ìÀɭȤơA¦Ó¨S¦³¥t¥~copy¦¨·sÀÉ.

½Ð°Ý¥i¥H¦p¦ó­×§ï¦¨§Ú­nªº¥\¯à¡H
  1. Sub Qcopy()
  2. Option Explicit
  3. Dim Wb As Workbook, Sh As Worksheet, Rng As Range
  4. Set Wb = Workbooks("¶i¥X¤f½Ð´Ú.2017.xlsx")
  5. For Each Sh In Wb.Sheets
  6.     With Sh
  7.         .UsedRange = .UsedRange.Value
  8.     End With
  9. Next
  10. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ PJChen ©ó 2018-5-19 18:27 ½s¿è

¦^´_ 2# naruto018

¤j¤j¦n,
§ï¦¨¥H¤U´N¹F¦¨§Ú­nªº¥\¯à¤F,ÁÂÁ¡I
  1. Sub Qcopy()
  2. Set Wb = Workbooks("¶i¥X¤f½Ð´Ú.2017.xlsx")

  3. Wb.Sheets.Copy
  4. For Each Sh In Sheets
  5. Sh.Cells.Copy
  6. Sh.Cells.PasteSpecial xlPasteValues '­È¤Æ
  7. Next
  8. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ PJChen ©ó 2018-5-19 18:38 ½s¿è

¦^´_ 3# ikboy
±z¦n,
±zªºµ{¦¡¥i¥H°õ¦æ±o§ó§Ö³t¡A§Ú±Nµ{¦¡§ï¬°¥H¤U¡A§Q¥ÎO1Àx¦s®æ¥h«ü©wÀɦW,¦ýsheet¤]·Q¥Î«ü©wªº¤è¦¡¼g¦bQ2¡A
¨Ò¦p¡G§Ú·QÅý©Ò¦³ÀɦW¥]§t"338"ªº¤u§@ªí(¤]´N¬OQ2=338)¥þ³¡³£­È¤Æ¡A½Ð°Ý¸Ó¦p¦ó¼g³o¤@¬qµ{¦¡¡H
  1. Option Explicit
  2. Dim Wb As Workbook, Sh As Worksheet
  3. Sub Qcopy()
  4. Set Wb = Workbooks(Workbooks("VBA³øªí«ü¥O.xlsm").Worksheets("°Ê§@").Range("O1").Value) 'Àx¦s®æªº­È¬°ÀɮצWºÙ
  5. Wb.Sheets.Copy
  6. For Each Sh In Sheets
  7.     With Sh
  8.         .UsedRange = .UsedRange.Value
  9.     End With
  10. Next
  11. End Sub
½Æ»s¥N½X

TOP

¦^´_ 7# PJChen

½Ð°Ý:
¥H¤Uµ{¦¡¡AÀɦW«ü©w¦bO1¡AO1ÀÉ®×¥þ³¡copy«á­È¤Æ¡C
§Ú·Q°µ¥t¤@ºØ¤è¦¡¡A°£¤FO1«ü©wÀɦW¥~¡A±Nsheetªº¦WºÙ«ü©w¦bQ2¡AÅýsheet¦WºÙ¥i¥H¦Û¥ÑÅÜ°Ê¡A¤]´N¬O¥u­nsheet¦WºÙ§t»\¦bQ2ªº¦WºÙ¤º¡A³£¥i¥H¦Û°Ê§¹¥þ½Æ»s¨ì·sÀɮפ¤¨Ã­È¤Æ¡A½Ð°Ý¸Ó¦p¦ó­×§ï¥H¤Uµ{¦¡¡H
  1. Sub Qcopy()
  2. Set Wb = Workbooks(Workbooks("VBA³øªí«ü¥O.xlsm").Worksheets("°Ê§@").Range("O1").Value) 'Àx¦s®æªº­È¬°ÀɮצWºÙ
  3. Wb.Sheets.Copy
  4. For Each Sh In Sheets
  5.     With Sh
  6.         .UsedRange = .UsedRange.Value '­È¤Æ
  7.         Application.DisplayAlerts = False '¦bµ{§Ç°õ¦æ¹Lµ{¤¤¨Ï¥X²{ªºÄµ§i®Ø¤£Åã¥Ü
  8.     End With
  9. Next
  10. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¬°¤H³B¥@­n¤p¤ß²Ó¤ß¡A¦ý¤£­n¡u¤p¤ß²´¡v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD