Cái này của A Hiếu , Bạn thử xem .
_________________________
Sub InPhieuThuChi()
On Error Resume Next
S203.Select
Dim M As String
Dim TP As Long
Dim DP As Long
Dim SP As Long
With Application
.ScreenUpdating = True
.Calculation = xlCalculationAutomatic
End With
Select Case MsgBox(" -In Phiêìu Thu : YES" & Chr(13) & Chr(13) & " -In Phiêìu Chi : NO" & Chr(13) & Chr(13) & " HuÒy Lêònh In : CANCEL", vbYesNoCancel, "Thêì DuÞng")
Case vbCancel
Application.ScreenUpdating = True
Exit Sub
Case vbYes
M = "T"
Case vbNo
M = "C"
End Select
TP = Application.InputBox("TýÌ Phiêìu sôì:", "Thêì DuÞng", Type:=1)
DP = Application.InputBox("Ðêìn Phiêìu sôì:", "Thêì DuÞng", Type:=1)
If TP > 0 And DP > 0 And TP <= DP Then
For SP = TP To DP Step 1
Range("n1").Value = M & " " & SP
If Range("c11").Value >= 0 Then ActiveWindow.SelectedSheets.PrintPreview
'PrintOut Copies:=1
Next SP
Else
MsgBox "Không Coì Phiêìu CâÌn In !!!", vbOKOnly, "Thêì DuÞng"
End If
With Application
.ScreenUpdating = True
End With
End Sub