Print only if Cell is non-blank
I am getting an "out-of-range" error on this code:
Private Sub PrintButton1_Click()
If IsEmpty(Worksheets("Sheet1").Range("A8").Value) Then
Worksheets("Sheet1").PrintOut Copies:=1
End If
End Sub
I have a command button set up such that when clicked, the code should check
a certain cell on each sheet of a workbook and print the sheets that have
some value in that cell. Any ideas??
|