- ©«¤l
- 31
- ¥DÃD
- 12
- ºëµØ
- 0
- ¿n¤À
- 69
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN XP
- ³nÅ骩¥»
- OFFICE 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-8-19
- ³Ì«áµn¿ý
- 2016-1-2
|
¦^´_ 2# kimbal
ÁÂÁª©¤jªº«üÂI ¤£¹L¦b¸g¹L´ú¸Õ¤§«á
With PageSetup
If K <= 45 Then
.PrintArea = "A1:x45"
¤W¦¡¤¤ªºx ¨Ã«D§Únªº«¬ºA(ÅܼÆx)
»P x = i ªºx µLªk³sµ²
¥i§_½Ð¤j¤j¦bÀ°§Ú¬Ý¤@¤U^-^:D
ÁÙ¦³¤@Ó¤p°ÝÃD´N¬O Trim(Str(K)) ³o¦ê¬O¤°»ò·N«ä???:Q- Private Sub CommandButton1_Click()
- Dim Fs, t, Wb As Workbook, St As Worksheet
- Dim K%, x%, i%
- Fs = Application.GetOpenFilename("Excel,*.xls", , , , True) '
- If Not IsArray(Fs) Then Exit Sub
- For Each t In Fs
- If t <> ThisWorkbook.Name Then
- Set Wb = GetObject(t)
- For Each St In Wb.Worksheets
-
- With St.Cells
- K = .Range("B65536").End(xlUp).Row
- End With
-
- With St.Range("A9:O9")
- For i = .Cells.Count To 1 Step -1
- If .Cells(i).Borders.LineStyle = xlContinuous Then
- x = i
- Exit For
- End If
- Next
- End With
-
- With St.PageSetup
-
- If K <= 45 Then
- .PrintArea = "A1:x45"
- '.PrintArea = Range("A1:X45").Address
-
- ElseIf K <= 82 Then
- .PrintArea = "A1:x82"
- '.PrintArea = "A1:x82"
-
- ElseIf K <= 115 Then
- .PrintArea = "A1:x115"
- '.PrintArea = "A1:x115"
-
- ElseIf K <= 151 Then
- .PrintArea = "A1:x151"
- '.PrintArea = "A1:x151"
-
- Else
- .PrintArea = "A1:x" & Trim(Str(K)) '¦C¦L½d³ò"
- '.PrintArea = "A1:X" & Trim(Str(K))
- '.Zoom = 100 'ÁY©ñ¤ñ¨Ò
- End If
- End With
-
- With St.Range("A12:x151").Borders
- 'With St.Range("A12:X151").Borders
- .LineStyle = xlContinuous '½uºØÃþ =¹ê½u
- .Weight = xlHairline '½u²Ê²Ó=·¥²Ó
- .ColorIndex = 1 ' ½u¦â , 1=¶Â¦â
- End With
- St.PrintOut
-
- Next
- Wb.Close 0
- End If
- Next
- End Sub
½Æ»s¥N½X |
|