You are on page 1of 1

Private Sub CommandButton1_Click()

Dim Phon, Akhee As Integer


Phon = Range("C3").Value
Akhee = Range("C5").Value

If Phon <= Akhee And Phon >= 1 Then


Application.ScreenUpdating = False
For i = Phon To Akhee
With Sheets("Form")
.Range("B1").Value = i
.PrintOut
End With
Next i
Else
MsgBox "Cek lagi Nomor yang akan dicetak...!!!!", vbCritical, "Cetak Halaman"
End If
End Sub

You might also like