Print/Not print depending on dropdown list value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, I'd like to print (or not print) a particular printing page in a
Worksheet when printing depending on the selection of a dropdown list, where
the list contains "YES" or "NO" created using data validation. Is this
possible? Thanks
 
Hi Sam:

You need to use a workbook event before print as in:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
if activesheet.name="sheet1" then

' may need to change this
if activesheet.range("A1") = "NO" then
Cancel=true
end if
End Sub
 

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

Back
Top