printer problems

white6174

Board Regular
Joined
May 6, 2002
Messages
137
I have a custom printform with macros that I use do the printing for my workbook. The problem is that the printer sometimes jams. I thought it was the printer so I tryed another that was the same printer and it had the same problem. I then disabeled the printform and set my print area and printed that way and everything was fine. I then went back to the printform and it was fine.

Does this sound like a problem with my code or the printer.
(I don't see how my code could cause this)

the printer is a NEC 870

and heres some of my code it has some named ranges in it.

Thanks for any help you may provide
steve w


Private Static Sub PrintAll()
Dim count As Integer
Dim PlanCount As Integer
Dim PlanIndex As Single
Dim DPage1 As Variant
Dim DPage2 As Variant
Dim BPages1 As Variant
Dim BPage2 As Variant
Dim i As Integer
Dim p As Integer

DPage1 = Array("DPLAN_BLINDS1", "DPLAN_SHADES1", "DPLAN_SHUTTERS1", "DPLAN_DRAPES1", "DPLAN_VALANCE1")
DPage2 = Array("DPLAN_BLINDS2", "DPLAN_SHADES2", "DPLAN_SHUTTERS2", "DPLAN_DRAPES2", "DPLAN_VALANCE2")
BPage1 = Array("BPLAN_BLINDS1", "BPLAN_SHADES1", "BPLAN_SHUTTERS1", "BPLAN_DRAPES1", "BPLAN_VALANCE1")
BPage2 = Array("BPLAN_BLINDS2", "BPLAN_SHADES2", "BPLAN_SHUTTERS2", "BPLAN_DRAPES2", "BPLAN_VALANCE2")
PlanCount = cboPlans.ListCount - 1
check1 = Array(CheckBox2.Value, CheckBox3.Value, CheckBox4.Value, CheckBox5.Value, CheckBox6.Value)
For PlanIndex = 0 To PlanCount
cboPlans.ListIndex = PlanIndex
Form_Refresh
If chkDesign.Value = True Then
For i = 0 To 4
If check1(i) = True And (OptionButton1.Value = True Or OptionButton3.Value = True) Then
Range(DPage1(i)).PrintOut
End If
If check1(i) = True And (OptionButton2.Value = True Or OptionButton3.Value = True) Then
Range(DPage2(i)).PrintOut
End If
Next
End If
If chkBuilder.Value = True Then
For i = 0 To 4
If check1(i) = True And (OptionButton1.Value = True Or OptionButton3.Value = True) Then
Range(BPage1(i)).PrintOut
End If
If check1(i) = True And (OptionButton2.Value = True Or OptionButton3.Value = True) Then
Range(BPage2(i)).PrintOut
End If
Next
End If
Next
End Sub
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Forum statistics

Threads
1,214,423
Messages
6,119,398
Members
448,892
Latest member
amjad24

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top