View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
moon[_6_] moon[_6_] is offline
external usenet poster
 
Posts: 43
Default Disable Printing If Cell Empty


Because the 'value' is always True, even if it's an empty value.
So...

If Application.ActiveSheet.Range("B40").Value < Empty Then
ActiveSheet.PrintOut
End If



"Rob" schreef in bericht
...
Ahhhh sweet. I tried your suggestion but it still prints.

"moon" wrote:

It means 'almost I guess'.
I'm just confusing newsgroups, that's all :-o



"Rob" schreef in bericht
...
Ummmm... What?

"moon" wrote:


Bijna... Denk ik.


If Application.ActiveSheet.Range("B40").Value = True Then
ActiveSheet.PrintOut
End If

"Rob" schreef in bericht
...
I'm wondering if there is a way to disable the ability to print
unless
cell
B40 is < FALSE, Something like this...


Sub ThisWorkbook_Print()

If Application.ActiveSheet.Range("B40").Value = False Then
Application.ActivePrinter = Nothing
End If

End Sub

I was hoping that the above code I made might do it but it doesn't
seem
to
work.

Any Ideas?

Thanks In Advance,
Rob