ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Help with a simple print macro (https://www.excelbanter.com/new-users-excel/175875-help-simple-print-macro.html)

Eee

Help with a simple print macro
 
Guys,

I have inherited a spreadsheet with a macro built in. The macro is in a sheet and simply prints the next worksheet in the book. However, I've changed just one thing in the sheet to be printed, I've protected it. Now I get the message 'you cannot use this message on a protected sheet' When i depress the debug button it highlights 'Set rng = WS.Range("A1").CurrentRegion '<<< Change' as being the problem.

Can this be resolved ?

CLR

Help with a simple print macro
 
One way would be to modify your macro to first "unprotect" the sheet, then do
your print stuff, then "re-protect" the sheet before ending.

Vaya con Dios,
Chuck, CABGx3



"Eee" wrote:


Guys,

I have inherited a spreadsheet with a macro built in. The macro is in
a sheet and simply prints the next worksheet in the book. However,
I've changed just one thing in the sheet to be printed, I've protected
it. Now I get the message 'you cannot use this message on a protected
sheet' When i depress the debug button it highlights 'Set rng =
WS.Range("A1").CurrentRegion '<<< Change' as being the problem.

Can this be resolved ?




--
Eee



All times are GMT +1. The time now is 08:42 AM.

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