- ©«¤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
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2016-10-8 15:17 ½s¿è
¦^´_ 4# simplehope
¸Õ¸Õ¬Ý- Option Explicit
- Sub Ex()
- Dim Sh As Worksheet, xCol As Integer, Rng As Range, i As Integer
- For Each Sh In ActiveWorkbook.Sheets
- If Sh.PageSetup.PrintArea <> "" Then
- Set Rng = Nothing
- With Sh
- xCol = .VPageBreaks(1).Location.Column
- For i = 1 To .HPageBreaks.Count
- If .HPageBreaks(i).Location.Range("F16") = "" Then Set Rng = .HPageBreaks(i).Location: Exit For
- Next
- If Not Rng Is Nothing Then
- .PageSetup.PrintArea = .Range("a1", .Cells(Rng.Offset(-1).Row, xCol)).Address
- .Range("a1", .Cells(Rng.Offset(-1).Row, xCol)).Select
- .Range(Rng, .Range("A" & .Cells.SpecialCells(xlCellTypeLastCell).Row)).Resize(, xCol).Delete xlUp
- 'AJÄæ쥻¤½¦¡=IF(AT14="","",$AT$74) , §ï¤½¦¡ =Á`¶¼Æ
- End If
- End With
- Sh.Names.Add Name:="Á`¶¼Æ", RefersToR1C1:=Sh.HPageBreaks.Count + 1
- End If
- Next
- End Sub
½Æ»s¥N½X PS:2016/10/08 ×¥¿ |
|