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

¦Û°Ê¶ñ¤J¥¼°µ¦C¦L¼Ð°Oªº§Ç¸¹

¨Ìlpk187©Ò´£¨Ñªºµ{¦¡½X¡Aµy§@eventªº­×§ï¡A²{¤w¤j­P§¹¦¨©Ò´Á±æªº¥\¯à

¦ý¤£¾å±o¬O§_¯àÅý¥t¦sªº·sÀɦs¬°.jpg or pdfÀÉ©O?  ¦Û¤w¸ÕµÛ§ïµ²ªG¬O¤£¦æªº~¨þ
¦¹¥Øªº¡A¬O¤£§Æ±æUser¯à¦Û¦æ¶}±ÒÀÉ®×­×¥¿~

¥H¤W~ÁÂÁÂ

TOP

¦^´_ 3# chi830


    ¦bThisWorkbook¶K¤W³o­Ó¥N½X¸Õ¸Õ
  1. Private Sub Workbook_BeforePrint(Cancel As Boolean)
  2. Pr = Worksheets("²Î­p").Range("B2")
  3.     For Each fi In Worksheets("§Ç¸¹").Range("A2:A" & Worksheets("§Ç¸¹").Range("A65536").End(xlUp).Row)
  4.         If Pr = fi Then
  5.             Worksheets("§Ç¸¹").Cells(fi.Row, "B") = "V"
  6.             Exit For
  7.         End If
  8.     Next
  9. Patha = ThisWorkbook.Path & "\"
  10.     Worksheets("²Î­p").Select
  11.     Range("A1:L10").Select
  12.     Selection.Copy
  13.     Workbooks.Add (xlWBATWorksheet)
  14.     Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
  15.         :=False, Transpose:=False
  16.     Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
  17.         SkipBlanks:=False, Transpose:=False
  18.     Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _
  19.         SkipBlanks:=False, Transpose:=False
  20.     ActiveWorkbook.Worksheets("¤u§@ªí1").Name = Pr & "²Î­p"
  21.     Range("A1").Select
  22.     ActiveWorkbook.SaveAs Filename:=Patha & Pr & ".xlsb", _
  23.         FileFormat:=xlExcel12, CreateBackup:=False
  24. Workbooks(Pr & ".xlsb").Close True
  25. End Sub
½Æ»s¥N½X

TOP

¤Ó´Î¤F~·Plpk187¥ý¶iªº¦^´_¡A ¦³¦¬Àò ~Æg
   §ï¥ÎButtonªº¤è¦¡¹ê§@¡Aok~

   ¦ý²{¦b·Q°µ§ó¶i¤Æªº¥\¯à(¤£±Ä¥Îbutton)
   1¡Buser¯uªº¦C¦L«á¡A¦Û°Ê¦^¼g§Ç¸¹­¶BÄ檺V¡A³o¸Ìªºµ{¦¡½XÀ³¦p¦ó­×§ï?
   2¡B¦P®É¦C¦L§¹¡A'²Î­p­¶'­n¥t¦s¦¨ÀɦW¬°'²Î­p­¶'B2ªºexcel¡A¨Ò¦pNo.20150007.xls
         ²Î­p­¶³o¸Ì¬O¼Ï¶s©Ò¶]¥X¨Óªºµ²ªG­È¡A¥t¦sÀÉ«á¡A©Ò¨D¬O­n­ì¿z¿ïªº¤º®e­È

  ¥H¤W~¦A½Ð¥ý¶i­Ì½ç±Ð~

TOP

¥»©«³Ì«á¥Ñ lpk187 ©ó 2015-3-3 20:13 ½s¿è
  1. Sub ¦C¦L()
  2. '
  3. ' ¥¨¶°1 ¥¨¶°
  4. '
  5. '§A¦C¦Lªºµ{¦¡¥N½X«á¥[¤W¤U­±³o2¥y

  6. End1 = Worksheets("§Ç¸¹").Columns("A").Find([B2], , , xlWhole, , 2).Row
  7. Worksheets("§Ç¸¹").Cells(End1, "B") = "V"
  8. End Sub


  9. '¦b "²Î­p" ªº¤u§@ªíªºµ{¦¡½X¤¤¶K¤W¤U­±³o­Óµ{§Ç
  10. Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  11. If Target.Address = [B2].Address Then
  12.         For Each §Ç¸¹ In Worksheets("§Ç¸¹").Range("A2:A" & Worksheets("§Ç¸¹").Range("A65535").End(xlUp).Row)
  13.     ro = §Ç¸¹.Row
  14.     If Sheets("§Ç¸¹").Cells(ro, "B") = "" Then
  15.         [B2] = Worksheets("§Ç¸¹").Cells(ro, "A")
  16.         End
  17.     End If
  18.     Next
  19. End If
  20. End Sub
½Æ»s¥N½X
¦^´_ 1# chi830

TOP

        ÀR«ä¦Û¦b : ¤@­Ó¯Ê¤fªºªM¤l¡A¦pªG´«¤@­Ó¨¤«×¬Ý¥¦¡A¥¦¤´µM¬O¶êªº¡C
ªð¦^¦Cªí ¤W¤@¥DÃD