ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Code not drawing data for printing (https://www.excelbanter.com/excel-programming/357251-code-not-drawing-data-printing.html)

Dean[_9_]

Code not drawing data for printing
 
Hi All, Hoping I could get some help with this code (It's got me beat).
I am using it on XL97 and the code will print out blank pages but no
data.

Originally the code was generating a runtime error 13 type mismatch
error so I did some research and added this code to overcome the error:


If IsNumeric(ActiveCell.Offset(0, 14)) Then
If ActiveCell.Offset(0, 14).Value < 0 Then
End If
End If

I would really appreciate some advice on what I am missing here?

Many Thanks,
Dean


Sub Macro4()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
ActiveSheet.DisplayPageBreaks = False
ActiveSheet.Unprotect Password:="XXXXXX"
MsgBox "Labels Spooled to Printer" & Chr(13) & "Click OK to Proceed" &
Chr(10)
LR = Range("B991").End(xlUp).Row ' Determine the last used row
For Each cell In Range("B1:B" & CStr(LR))
Rows(cell.Row).EntireRow.Hidden = True
If IsNumeric(ActiveCell.Offset(0, 14)) Then
If ActiveCell.Offset(0, 14).Value < 0 Then
End If
End If
Next cell
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Cells.EntireRow.Hidden = False
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
ActiveSheet.Protect Password:="XXXXXX"
Application.Run Macro:="Macro6"
End Sub



All times are GMT +1. The time now is 01:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com