- ©«¤l
- 124
- ¥DÃD
- 43
- ºëµØ
- 0
- ¿n¤À
- 167
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows7
- ³nÅ骩¥»
- office2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW¥x¥_
- µù¥U®É¶¡
- 2011-3-16
- ³Ì«áµn¿ý
- 2021-10-7
|
קï¥N½X
¥»©«³Ì«á¥Ñ vinejason ©ó 2014-6-6 12:25 ½s¿è
¥¦w
¦³4ÓSheet ¤À§O¬O¾P³f±b³æ »P ¾P³f©ú²Ó »P ®Ñ¥Ø »P «È¤á¸ê®Æ
¤U¦C¥N½X¥i¿é¤J¾P³f©ú²Óªº½s¸¹ ¿ï¾Ü¦C¦L
¨Ò¦p¿é¤J s10305101~s10305110
¥i§ì¨ú¸ê®Æ¶i¦æ¦C¦L¦¹¤Q±i¤£¦P¦U¤áªº¾P³f³æ
¥u¬O°õ¦æ³t«×¬Û·í½wºC
Public Sub prtbill(bgnum, ndnum)
Application.StatusBar = "³øªí¦C¦L°õ¦æ¤¤@@@@@·q½ÐµyÔ!"
Sheet1.Cells.AutoFilter
Dim rng As Range
Sheet2.Activate '¾P³f±b³æ
Sheets("¾P³f±b³æ").Unprotect 'Á׶}«OÅ@
Set rng = Union(Range("B9:D32"), Range("F9:F32"), Range("H9:H32"), Range("C4:D7"), Range("C3"), Range("G5:G6"))
rng.ClearContents
fmidx = CLng(bgnum)
toidx = CLng(ndnum)
With Sheet3 '¾P³f²M³æ
For i = fmidx To toidx
rr = 2
nn = 9
Do Until .Cells(rr, "c") = Empty
If .Cells(rr, 3).Value = i Then
Cells(3, "g") = .Cells(rr, 3).Text
Cells(3, "c") = .Cells(rr, 1)
Cells(4, "g") = .Cells(rr, 4)
Cells(7, "g") = .Cells(rr, 9)
Cells(nn, "b") = .Cells(rr, "e")
Cells(nn, "d") = .Cells(rr, "f")
Cells(nn, "f") = .Cells(rr, "g")
Cells(nn, "h") = .Cells(rr, "l")
With Sheets("«È¤á¸ê®Æ")
Set F1 = .Columns(1).Find([C3])
[c4] = .Cells(F1.Row, 2)
[c5] = .Cells(F1.Row, 7)
[c6] = .Cells(F1.Row, 6)
[G5] = .Cells(F1.Row, 4)
[G6] = .Cells(F1.Row, 3)
End With
nn = nn + 1
If nn = 33 Then
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
rng.ClearContents
nn = 9
End If
End If
rr = rr + 1
Loop
If nn > 9 Then ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
rng.ClearContents
Next i
End With
ActiveSheet.Protect '«ì´_«OÅ@
Set BillRange = Worksheets("¾P³f²M³æ").Range("C1:C65535") '³f³æ½s¸¹»¼¼W
n = Application.WorksheetFunction.Max(BillRange)
Sheets("¾P³f±b³æ").Select
Range("G3").Select
ActiveCell.FormulaR1C1 = n + 1
Sheets("¾P³f±b³æ").Select
Range("C3").Select
'Range("R9:R32").ClearContents
Set x = Cells.Find("xx", lookat:=xlPart) 'ÁÙì"´M§ä®Ø"¤£¤Ä¿ïª¬ºA
Set rng = Nothing 'ª«¥óÄÀ©ñ
Application.StatusBar = False
End Sub |
|