I have this macro that prints records based on a range that the user specifies. The only problem is that I'm still (trying to!) learning and would like to know how the code can be written so that the input box with ".....Starting Record" appears before and not after the input box ".......End Record" which is what is happening at the moment.
VB:
Sub Print_All()
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Dim x As Variant
Dim v As Variant
v = InputBox("Please enter the Ending Record number")
For i = InputBox("Please enter the Starting Record number") To v
x = i
Range("n2").FormulaR1C1 = x
Sheets("Deskingsheet").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
IgnorePrintAreas:=False
Next i
End Sub
Thanks in advance
Lee
VB:
Sub Print_All()
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Dim x As Variant
Dim v As Variant
v = InputBox("Please enter the Ending Record number")
For i = InputBox("Please enter the Starting Record number") To v
x = i
Range("n2").FormulaR1C1 = x
Sheets("Deskingsheet").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
IgnorePrintAreas:=False
Next i
End Sub
Thanks in advance
Lee