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

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

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

½Ð±Ð¦U¦ì¥ý¶i~

¦b¬Y¤@³]­p¦nªº¸ê®Æ­¶­±¡A·Q­nÅýexcel¦Û°Ê±q ¡u§Ç¸¹¡v­¶¤¤¡A±a¤J¥Ø«e©|¥¼¥Î¹Lªº§Ç¸¹­È¡A¦³¤°»ò¤èªk¶Ü?


ªþ¤WÀÉ®×»¡©ú~~ÁÂÁ¤j®a~~

¦¨«~¥XªùÃÒ+§Ç¸¹.zip (18.23 KB)

¥»©«³Ì«á¥Ñ 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

¤Ó´Î¤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

¦^´_ 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

¨Ì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

¥»©«³Ì«á¥Ñ lpk187 ©ó 2015-3-10 21:59 ½s¿è

¦^´_ 5# chi830


    ¥i¥H¦s¦¨PDFÀÉ¡A¤£¹L·|©MBeforePrint¨Æ¥ó§Î¦¨µL­­°j°é¡A©Ò¥H­n³]¤@­Ó°±·lÂIµ¹¥L¡A¤]´N¬O­n«Å§i¤@­Ó¤½¥ÎÅܼƵ¹¥L°µ°±·lÂI¡A´N¥i¥H¦s¦¨PDFÀɤF ¡A¥H¤U¥N½X§A¦A¸Õ¸Õ¬Ý¦æ¤£¦æ¡I
  1. Dim N! '«Å§i¤@­Ó¥i°µ°±·lªº¤½¥ÎÅܼÆ
  2. Private Sub Workbook_BeforePrint(Cancel As Boolean)
  3. If N > 0 Then
  4.     N = 0 'µ²§ô«e¥ý§âN³]¦^0¡A³o¼Ë´N¤S¥i¥H¤U¦¸°õ¦æBeforePrint¨Æ¥ó
  5.     Cancel = False '³o¸Ì«h¬O¯u¥¿°±¤î®É¡A¥i¥H¦C¦L¤å¥ó
  6.     End
  7. End If
  8. N = N + 1
  9. Cancel = True '°õ¦æ²Ä¤@¦¸_BeforePrint¨Æ¥ó®ÉÅý¥¦°±¤î¦C¦L
  10. Pr = Worksheets("²Î­p").Range("B2")
  11.     For Each fi In Worksheets("§Ç¸¹").Range("A2:A" & Worksheets("§Ç¸¹").Range("A65536").End(xlUp).Row)
  12.         If Pr = fi Then
  13.             Worksheets("§Ç¸¹").Cells(fi.Row, "B") = "V"
  14.             Exit For
  15.         End If
  16.     Next
  17. Patha = ThisWorkbook.Path & "\"
  18.     ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
  19.         Patha & Pr & ".pdf", Quality:=xlQualityStandard, _
  20.         IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
  21.         True
  22. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ chi830 ©ó 2015-3-11 13:06 ½s¿è

¦^´_ 6# lpk187

    ¦¨«~¥XªùÃÒ+§Ç¸¹.zip (31.8 KB)

    ÂàPDF¥¢±Ñ¡A·|¥X²{¡u¤å¥ó¥¼Àx¦s¡C¤å¥ó¥i¯à¤w¶}±Ò¡A©Î¦bÀx¦s¹Lµ{¤¤µo¥Í¿ù»~¡v
   

    ¥t¥~½Ð±Ð¦]¡u²Î­p¡v©Ò¿z¿ï¤§µ²ªG¦³ªø¡A¦³µu
    ­Y¥Î Worksheets("²Î­p").Select
             Range("A1:L10").Select
             Selection.Copy
    ´N¥u·|½Æ»s¨ìA1:L10°Ï¶¡¸ê®Æ¡A¯à§_±N©Ò¦³µ²ªG³£COPY¨ì©O?

TOP

¦¨«~¥XªùÃÒ+§Ç¸¹.rar (35.46 KB)
¸Õ¸Õ¬Ý
¦^´_ 7# chi830

TOP

¥»©«³Ì«á¥Ñ lpk187 ©ó 2015-3-11 13:57 ½s¿è

¸Õ¸Õ¬Ý
²Ä¤G­Ó°ÝÃD¦p¤U
Worksheets("²Î­p").Select
Range("A1:L10").Select
Selection.Copy
'¤W­±ªº¦¡¤F¥i¥H¤£¥Î¦³Select©Ò¥H¥i¥H¥u¼g¦¨¤U­±


'              vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv'³o¤@¥y¬O¥i¥H¦Û¤v§PÂ_¨ì­þ¤@¦C
Range("A1:L" & Cells(Rows.Count, "L").End(xlUp).row).Copy

TOP

¦^´_ 8# lpk187


   ¤´¬OµLªk¦sPDFÀÉ©O~ ¤@¼Ëªº¿ù»~°T®§

TOP

        ÀR«ä¦Û¦b : ¹ï¤÷¥À­nª¾®¦¡A·P®¦¡B³ø®¦¡C
ªð¦^¦Cªí ¤W¤@¥DÃD