K
Kobus
Hi
I have six sheets in my workbook. On my userform I have a checkBox for each
sheet and a button to start the printing. The user selects which sheets to
print by selecting the checkBoxes. When I try to print though it tells me
"Run-time error '1004':
Method 'PrintPreview' of object '_Worksheet' failed"
Below is a sample of the code i am using
Private Sub CommandButton1_Click()
Windows("Data.xls").Activate
If CheckBox1.Value Then
Sheet1.PrintPreview
'ActiveSheet.PrintOut
End If
End Sub
All help wil be greatly appreciated.
I have six sheets in my workbook. On my userform I have a checkBox for each
sheet and a button to start the printing. The user selects which sheets to
print by selecting the checkBoxes. When I try to print though it tells me
"Run-time error '1004':
Method 'PrintPreview' of object '_Worksheet' failed"
Below is a sample of the code i am using
Private Sub CommandButton1_Click()
Windows("Data.xls").Activate
If CheckBox1.Value Then
Sheet1.PrintPreview
'ActiveSheet.PrintOut
End If
End Sub
All help wil be greatly appreciated.