Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rob Rob is offline
external usenet poster
 
Posts: 718
Default Disable Printing If Cell Empty

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Disable Printing If Cell Empty


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



  #3   Report Post  
Posted to microsoft.public.excel.programming
Rob Rob is offline
external usenet poster
 
Posts: 718
Default Disable Printing If Cell Empty

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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Disable Printing If Cell Empty

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






  #5   Report Post  
Posted to microsoft.public.excel.programming
Rob Rob is offline
external usenet poster
 
Posts: 718
Default Disable Printing If Cell Empty

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








  #6   Report Post  
Posted to microsoft.public.excel.programming
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








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I disable the advanced printing features permanently? Dolores Excel Discussion (Misc queries) 2 January 17th 10 06:42 PM
How to disable printing a specific worksheet? Efzed Excel Worksheet Functions 1 February 21st 07 05:43 PM
How to disable printing a specific worksheet? William Horton Excel Worksheet Functions 0 February 21st 07 02:12 PM
Printing gridlines with empty cell nickjohn Excel Discussion (Misc queries) 2 May 6th 06 07:57 PM
Disable Printing JOHN SMITH Excel Discussion (Misc queries) 2 April 14th 05 01:00 AM


All times are GMT +1. The time now is 01:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"