A
Archimedes' Lever
Guest
On Sun, 5 Apr 2009 09:04:51 -0700, "RST Engineering \(jw\)"
<jim@rstengineering.com> wrote:
momentarily.
I had the same issue you did, and fount the cause to be cell formatting
issues. The cell must be formatted as a number, and the cell, if filled
from another location must have been filled as a number.
<jim@rstengineering.com> wrote:
I was able to get it to work, and will post my test sheet up in a.b.s.eCan you post the code?
Cheers
Sure, here you go:
Sub selprint()
Dim i As Integer
Dim currentsheet As Worksheet
For i = 1 To ActiveWorkbook.Worksheets.Count
Set currentsheet = ActiveWorkbook.Worksheets(i)
Worksheets(i).Activate
'Skip empty sheets and hidden sheets
If Application.CountA(currentsheet.Cells) <> 0 And currentsheet.Visible
Then
'change the hard-coded cell here if not F52
If (Not IsNull(Range("F52"))) And (Range("F52").Value <> 0) Then
'un-comment the next line when debugging completed
' ActiveSheet.PrintOut
'add comment at start of next line when debugging completed
ActiveSheet.PrintPreview
End If
End If
Next i
End Sub
Jim
momentarily.
I had the same issue you did, and fount the cause to be cell formatting
issues. The cell must be formatted as a number, and the cell, if filled
from another location must have been filled as a number.