R
Razzcul
I have a excel workbook with as many a 2 to 25 pages and can still grow
I use VLOOKUP on the second sheet to grab info form the first. Sheets
thru end with all populate based on sheet before. I have a formula o
sheet 1 that determines how many sheets need to be print. How can I pu
this into a macro?
Here is what I have now. This only print 1 page per counter loop.
Sub doprint()
'
' doprint Macro
' Macro recorded 9/25/2003 by AvilaJ
Dim i As Integer
Dim oCell As Range
sname = InputBox("Start in Job Number?", " First Job to Print", 0)
sname2 = InputBox("Finish in Job Number?", " Last Job to Print"
0)
Range("I40").Select
ActiveCell.FormulaR1C1 = sname
Range("I41").Select
ActiveCell.FormulaR1C1 = sname2
For Counter = sname To sname2
Range("L5").Select
ActiveCell.FormulaR1C1 = Counter
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1
Collate _
:=True
Next Counter
End Su
I use VLOOKUP on the second sheet to grab info form the first. Sheets
thru end with all populate based on sheet before. I have a formula o
sheet 1 that determines how many sheets need to be print. How can I pu
this into a macro?
Here is what I have now. This only print 1 page per counter loop.
Sub doprint()
'
' doprint Macro
' Macro recorded 9/25/2003 by AvilaJ
Dim i As Integer
Dim oCell As Range
sname = InputBox("Start in Job Number?", " First Job to Print", 0)
sname2 = InputBox("Finish in Job Number?", " Last Job to Print"
0)
Range("I40").Select
ActiveCell.FormulaR1C1 = sname
Range("I41").Select
ActiveCell.FormulaR1C1 = sname2
For Counter = sname To sname2
Range("L5").Select
ActiveCell.FormulaR1C1 = Counter
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1
Collate _
:=True
Next Counter
End Su