PDA

View Full Version : [SOLVED] Print Preview



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

Killian
04-21-2005, 07:08 AM
The PrintPreview method applies to ranges (among other things) so can be used with your columns


Columns("C:G").PrintPreview

austenr
04-21-2005, 08:49 AM
I tried that but it does not stop there. Comes on for a brief second then disappears

Got it to work!! Thanks

Zack Barresse
04-21-2005, 08:54 AM
What did you change that made it work?

austenr
04-21-2005, 09:26 AM
Commented out the line right after that wher it clears the contents.


Stupid error.:banghead: