I wrote this code to try to minimize the amount of paper I throw away when printing. My purpose is to print 1 page of the active statement if the amount is less than $25. If the amount of the download royalty is 0, then I don't want to print out the download summary sheet. I originally tried the if, then, else statements to no avail. I then tried this code and it is printing the same way as the else statement. I'm basically only getting a print out of the statement sheet with an amount due of over $25. (not two like I want). My question is, the code is read over and down like a book. If I have two if statements back to back, does it read the second if statement?
Dim indx As Integer
For indx = 1 To UBound(labels)
Workbooks.Open Filename:=current_pathname & labels(indx).label_name & ".xls", ReadOnly:=True
Sheets("statement").Activate
If labels(indx).amount_due < 25 Then
ActiveSheet.PrintOut
If labels(indx).total_download_royalty = 0 Then
ActiveWorkbook.Close savechanges:=False
End If
End If
If labels(indx).amount_due >= 25 Then
ActiveSheet.PrintOut
ActiveSheet.PrintOut
If labels(indx).total_download_royalty > 0 Then
Sheets("download_summary").Activate
ActiveSheet.PrintOut
ActiveWorkbook.Close savechanges:=False
End If
End If
Next indx
Thanks in advance for your help.
Dim indx As Integer
For indx = 1 To UBound(labels)
Workbooks.Open Filename:=current_pathname & labels(indx).label_name & ".xls", ReadOnly:=True
Sheets("statement").Activate
If labels(indx).amount_due < 25 Then
ActiveSheet.PrintOut
If labels(indx).total_download_royalty = 0 Then
ActiveWorkbook.Close savechanges:=False
End If
End If
If labels(indx).amount_due >= 25 Then
ActiveSheet.PrintOut
ActiveSheet.PrintOut
If labels(indx).total_download_royalty > 0 Then
Sheets("download_summary").Activate
ActiveSheet.PrintOut
ActiveWorkbook.Close savechanges:=False
End If
End If
Next indx
Thanks in advance for your help.