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

[µo°Ý] Ãö©ó¤£©T©wÄæ ¦Û°Ê¦C¦L¦Ü³Ì«á¤@µ§¸ê®Æ

¦^´_ 9# lpk187


    ¤£¦n·N«ä..¦³ÂI¥dÃö ·sªºµ{¦¡½X

·|¿ï¾Ü©Ò¦³¦C,¥t¥~¥ÎÅܼƭpºâ¦C«á¦A©ñ¤J·|ÅÜ¥u¿ï¨ú³Ì¤W­±¨â¦C
Sub ¥¨¶°()
    Dim c As Range, firstAddress$, myColumn%
    With Sheets("¤u§@ªí1")
        Set c = .Rows(3).Find("P.P", LookIn:=xlValues)
            If Not c Is Nothing Then
                firstAddress = c.Address
                myColumn = 1
                Do
                     .Range(.Cells(2, myColumn), .Cells(Rows.Count, c.Column).End(xlUp)).Name = "Print_Area"
                     .PrintOut Copies:=1, Collate:=True, IgnorePrintAreas:=False
                    Set c = .Rows(3).FindNext(c)
                    myColumn = myColumn + 19
                Loop While Not c Is Nothing And c.Address <> firstAddress
            End If
    End With
End Sub

TOP

¦^´_ 11# starry1314


    Option Explicit

Sub ¥¨¶°1()
    Dim c As Range, firstAddress$, myColumn%
    With Sheets("¤u§@ªí1")
        Set c = .Rows(3).Find("P.P", LookIn:=xlValues) '´M¨D²Ä¤@­Ó¥Ø¼Ðª«¥ó
            If Not c Is Nothing Then '¦pªGcª«¥ó¤£¬O¬°Nothing®É¡A°õ¦æ
                firstAddress = c.Address '°O¿ý§ä¨ìªº²Ä¤@­Ó¦ì¸m
                myColumn = 1 '³]©wAÄæ
                Do
                     '.Range(.Cells(2, myColumn), .Cells(Rows.Count, c.Column).End(xlUp)).Name = "Print_Area" '
                     .Range(.Cells(Rows.Count, myColumn).End(xlUp), Cells(2, c.Column)).Name = "Print_Area" '³]©w¦C¦L½d³ò¡A¥H³]©w½d³ò¨Ó»¡¡A¨Ò¦p¡G"A1:C5"©M"A5:C1"¬O¤@¼Ëªº·N«ä
                     '¥u¤£¹LAÄæ¥i¥H§ä¨ì³Ì«á¤@¦C¡A©Ò¥H­n¥Î«áªÌ¨Ó³]©w½d³ò
                     .PrintOut Copies:=1, Collate:=True, IgnorePrintAreas:=False '¦C¦L
                    Set c = .Rows(3).FindNext(c) '´M§ä¤U¤@­Ó¥Ø¼Ðª«
                    myColumn = myColumn + 19 '¤U¤@­Ó­Ó¦ì¸m¬°TÄæ...¦A¨Ó¬OAMÄæ¡A¨Ì¦¹Ãþ±À
                Loop While Not c Is Nothing And c.Address <> firstAddress '·ícªº¦ì§}©M²Ä¤@­Ó¦ì§}¬Û¦P®É¡A¸õ¥X°j°é
            End If
    End With
End Sub

TOP

¦^´_ 12# lpk187


    ÁÂÁÂÀ°¦£~§¹¬ü¹B¦æ¡I

TOP

        ÀR«ä¦Û¦b : ·R¤£¬O­n¨D¹ï¤è¡A¦Ó¬O­n¥Ñ¦Û¨­ªº¥I¥X¡C
ªð¦^¦Cªí ¤W¤@¥DÃD