- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
        
|
¦^´_ 6# zhiling
¦]¬°¨C¥x¦Lªí¾÷³]©w¤@¶¦³´XÓ Rows ¬O¤£¤@©w
³o¸Ì¸Õ¸Õ¬Ý- Option Explicit
- Sub Ex()
- Dim Msg As String, xi As Integer
- With ActiveSheet
- If Application.CountA(.Range("a1").CurrentRegion) = 0 Then
- MsgBox "½d³ò¤º¨S¦³¸ê®Æ¥i¦L¦C"
- Exit Sub
- End If
- ActiveWindow.View = xlPageBreakPreview
- .PageSetup.PrintArea = .Range("a1").CurrentRegion.Address
- .PageSetup.PrintTitleRows = "$1:$1"
- .PageSetup.LeftFooter = "&14&N ¶- &P"
- '¶§À¥kÃä: &14-> ¦rÅéSize =14, &N->Á`¶¼Æ, &P->²Ä´X¶
- For xi = 0 To .HPageBreaks.Count
- Msg = "&14 ¤pp: " '&14: ¦rÅéSize =14
- If xi = 0 Then
- Msg = Msg & Application.Sum(.Range([b2], .HPageBreaks(1).Location.Cells(0, 2)))
- ElseIf xi > 0 And xi < .HPageBreaks.Count Then
- Msg = Msg & Application.Sum(.Range(.HPageBreaks(xi).Location.Cells(1, 2), .HPageBreaks(xi + 1).Location.Cells(0, 2)))
- Msg = Msg & Chr(10) & "²Öp: " & Application.Sum(.Range([b2], .HPageBreaks(xi + 1).Location.Cells(0, 2)))
- Else
- Msg = Msg & Application.Sum(.Range(.HPageBreaks(.HPageBreaks.Count).Location, .[b2].End(xlDown)))
- Msg = Msg & Chr(10) & "²Öp: " & Application.Sum(.Range("B:B"))
- End If
- .PageSetup.RightFooter = Msg '¶§À¥ªÃä:
- .PrintOut From:=xi + 1, To:=xi + 1, Copies:=1 '¤@¶¤@¶¦L¦C
- Next
- .DisplayPageBreaks = False '¨ú®ø¤À¶½u
- End With
- ActiveWindow.View = xlNormalView
- MsgBox "¦L¦C §¹¦¨"
- End Sub
½Æ»s¥N½X À³¥Î¦b 3# ÀÉ®× ¦p¹Ïªº¸ê®Æ¤¤
|
|