If active sheet and cell reference

I

iansmigger

I am currently using the following code in This Workbook to prevent printing
a worksheet until all cells vave been completed:-

Private Sub Workbook_BeforePrint(Cancel As Boolean)
If Range("E3").Text = "COMPLETE" Then

And then it reformats the sheet before printing.

The problem I have is that it also prevents printing any other sheets within
the workbook if this sheet is not in a complete status in cell E3.

I would like to do something along the lines of the following but do not
know the code to make it work:-

If Activesheet="Supplier Request Form" AND Range("E3").Text =
"COMPLETE" Then

Cheers

iansmigger
 
G

Gary''s Student

You are 97% there!
Instead of:

If Activesheet="Supplier Request Form".....

use:

If Activesheet.Name="Supplier Request Form".............
 
I

iansmigger

Thanks Gary

Gary''s Student said:
You are 97% there!
Instead of:

If Activesheet="Supplier Request Form".....

use:

If Activesheet.Name="Supplier Request Form".............
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top