ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Prevent Single Worksheet from Printing (https://www.excelbanter.com/excel-programming/384563-prevent-single-worksheet-printing.html)

Epoh Rio[_2_]

Prevent Single Worksheet from Printing
 
I need to be able to print all worksheets in an excel spread sheet
except for one. Can this be achieved programatically?


Don Guillett

Prevent Single Worksheet from Printing
 
something like

sub printallbutone()
for each ws in worksheets
if ws.name<"Dontprintthisone" then ws.printout
next ws
end sub


--
Don Guillett
SalesAid Software

"Epoh Rio" wrote in message
ups.com...
I need to be able to print all worksheets in an excel spread sheet
except for one. Can this be achieved programatically?




Epoh Rio[_2_]

Prevent Single Worksheet from Printing
 
Thanks for the quick reply. Where do insert this code? This workbook?


Don Guillett

Prevent Single Worksheet from Printing
 

That's OK. But, probably best in a regular module.
Just make sure you get the name of the worksheet right
"Sheet2" is NOT the same as "sheet2"
--
Don Guillett
SalesAid Software

"Epoh Rio" wrote in message
ups.com...
Thanks for the quick reply. Where do insert this code? This workbook?




Epoh Rio[_2_]

Prevent Single Worksheet from Printing
 
Thanks I will give it a try



All times are GMT +1. The time now is 08:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com