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

[µo°Ý] §âÀɦW©ñ¦b«ü©wÀx¦s®æ¤¤

[µo°Ý] §âÀɦW©ñ¦b«ü©wÀx¦s®æ¤¤

¥»©«³Ì«á¥Ñ PJChen ©ó 2018-5-16 22:36 ½s¿è

¤j¤j¦n,
§Ú·Q§âÀɦW+¤u§@ªí¦WºÙ¡A©ñ¦bµ{¦¡©Ò¦bªºÀÉ®× VBA³øªí«ü¥O¤¤
L8 §âÀɦW©ñ¦b³o¸Ì
M8 §âSheet¦WºÙ©ñ¦b³o¸Ì
³o¯Âºé¬°¤F´ú¸Õ «ü©wÀx¦s®æ¬°ÀɦW¬O§_¥i¦æ¡A©Ò¥H¨S¤°»ò¨ä¥L¥\¯à¡A
¦ý¤@ª½¥X²{¿ù»~¡A¥i§_½Ð°ª¤âÀ°¦£¬Ý¬Ýµ{¦¡¬O­þ¸Ì¥X¿ù¤F¡H ·PÁÂ
  1. Option Explicit
  2. Dim Wb As Workbook, Wb2 As Workbook, Sh As Worksheet
  3. Sub ª©­±³]©w()
  4.    
  5. Set Wb = Workbooks(Workbooks("VBA³øªí«ü¥O.xlsm").Worksheets("VBA«ü¥OII").Range("L8").Value) 'Àx¦s®æªº­È¬°ÀɮצWºÙ
  6. Set Sh = Workbooks(Workbooks("VBA³øªí«ü¥O.xlsm").Worksheets("VBA«ü¥OII").Range("M8").Value) 'Àx¦s®æªº­È¬°¤u§@ªí¦WºÙ
  7. With Wb.Sh
  8. .Range("E1").Copy

  9.   

  10. End With
  11.    
  12. End Sub
½Æ»s¥N½X

¦^´_ 1# PJChen

ª©¤j¦­¦w¡A­×¥¿¦p¤U¡A¦A³Â·Ð´ú¸Õ
  1. Option Explicit
  2. Dim Wb As Workbook, Wb2 As Workbooks, Sh As Worksheet

  3. Sub ª©­±³]©w()
  4.    
  5. Set Wb = Workbooks(Workbooks("VBA³øªí«ü¥O.xlsm").Worksheets("VBA«ü¥OII").Range("L8").Value) 'Àx¦s®æªº­È¬°ÀɮצWºÙ
  6. Set Sh = Worksheets(Workbooks("VBA³øªí«ü¥O.xlsm").Worksheets("VBA«ü¥OII").Range("M8").Value) 'Àx¦s®æªº­È¬°¤u§@ªí¦WºÙ

  7. With Wb.Worksheets(Sh.Name)
  8.     .Range("E1").Copy
  9. End With

  10. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# nolookyou

§Ú§âµ{¦¡§ï¬°,¦ý¬OµLªk°õ¦æ¡I
  1. Option Explicit
  2. Dim Wb As Workbook, Sh As Worksheet
  3. Sub ª©­±³]©w()
  4.    
  5. Set Wb = Workbooks(Workbooks("VBA³øªí«ü¥O.xlsm").Worksheets("VBA«ü¥OII").Range("L8").Value) 'Àx¦s®æªº­È¬°ÀɮצWºÙ
  6. Set Sh = Worksheets(Workbooks("VBA³øªí«ü¥O.xlsm").Worksheets("VBA«ü¥OII").Range("L9").Value) 'Àx¦s®æªº­È¬°¤u§@ªí¦WºÙ
  7. With Wb.Worksheets(Sh.Name)
  8.     .Range("E1").Copy

  9. End With   
  10. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ PJChen ©ó 2018-5-17 22:20 ½s¿è

¦^´_ 2# nolookyou

±z¦n,
§Ú¨Ó¦^¸Õ¤F«Ü¦h¦¸,³Ì«á§ï¦¨³o¼Ë,´N¥i¥H°õ¦æ.
  1. Option Explicit
  2. Dim Wb As Workbook, Sh As Worksheet
  3. Sub ª©­±³]©w()   
  4. Set Wb = Workbooks(Workbooks("VBA³øªí«ü¥O.xlsm").Worksheets("VBA«ü¥OII").Range("L8").Value) 'Àx¦s®æªº­È¬°ÀɮצWºÙ
  5. Set Sh = Wb.Worksheets(Worksheets("VBA«ü¥OII").Range("L9").Value) 'Àx¦s®æªº­È¬°¤u§@ªí¦WºÙ
  6.   With Wb.Worksheets(Sh.Name).PageSetup  '­Y¤£»Ý³]©w³]©wª©­±®É,¥i¥H§â.PageSetup¬Ù²¤

  7.     .LeftMargin = Application.InchesToPoints(0)  '¥ªÃä¬É
  8.     .RightMargin = Application.InchesToPoints(0)  '¥kÃä¬É
  9.     .TopMargin = Application.InchesToPoints(0) '¤WÃä¬É
  10.     .BottomMargin = Application.InchesToPoints(0)  '¤UÃä¬É
  11.     .HeaderMargin = Application.InchesToPoints(0) '­¶­º
  12.     .FooterMargin = Application.InchesToPoints(0)  '­¶§À
  13.     .Zoom = 200 '¦C¦LÁY©ñ

  14.   End With   
  15. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¤H­nª¾ºÖ¡B±¤ºÖ¡B¦A³yºÖ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD