austenr
04-21-2005, 07:02 AM
I want to test my print routine because I am fine tuning it but do not want to print the report every time. I have tried to use print preview but so far no luck. Can anyone help from the code below?
Public Sub PrintMtvGroupList()
LastRow = Range("A65536").End(xlUp).Row
Row = 1
Range("C1").Value = "Group Name"
Range("D1").Value = "Bill Rep"
Range("E1").Value = "Extension"
Range("F1").Value = "Group Number"
Range("G1").Value = "Back Up"
For i = 1 To LastRow Step 6
Range("C" & Row).Value = Range("B" & i).Text
Range("D" & Row).Value = Range("B" & i + 1).Text
Range("E" & Row).Value = Range("B" & i + 2).Text
Range("F" & Row).Value = Range("B" & i + 3).Text
Range("G" & Row).Value = Range("B" & i + 4).Text
Row = Row + 1
Next i
Columns("C:G").PrintOut
Columns("C:G").Clear
End Sub
Public Sub PrintMtvGroupList()
LastRow = Range("A65536").End(xlUp).Row
Row = 1
Range("C1").Value = "Group Name"
Range("D1").Value = "Bill Rep"
Range("E1").Value = "Extension"
Range("F1").Value = "Group Number"
Range("G1").Value = "Back Up"
For i = 1 To LastRow Step 6
Range("C" & Row).Value = Range("B" & i).Text
Range("D" & Row).Value = Range("B" & i + 1).Text
Range("E" & Row).Value = Range("B" & i + 2).Text
Range("F" & Row).Value = Range("B" & i + 3).Text
Range("G" & Row).Value = Range("B" & i + 4).Text
Row = Row + 1
Next i
Columns("C:G").PrintOut
Columns("C:G").Clear
End Sub