Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
kva
 
Posts: n/a
Default protect format - page setup

I've protected parts of my sheet, but also want to protect it's format. I
don't want the user to use page setup to alter the appearance. Any
suggestions?

  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

I don't think you can stop them.

But you could use the workbook_beforeprint event to put things back to what you
want.

Option Explicit
Private Sub Workbook_BeforePrint(Cancel As Boolean)

With Worksheets("sheet1").PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
.PrintArea = ""
.LeftHeader = ""
.CenterHeader = ""
'.etc....
End With

End Sub

This kind of code goes into the ThisWorkbook module.

(I'd just record a macro when I set it exactly the way I want. Then paste that
code into that module--and adjust the Activesheet references.)

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm


kva wrote:

I've protected parts of my sheet, but also want to protect it's format. I
don't want the user to use page setup to alter the appearance. Any
suggestions?


--

Dave Peterson
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
can you set the "Page Setup" margins etc. differently for each pag Tony Excel Worksheet Functions 4 February 2nd 05 01:15 PM
How to change default page setup for pivot tables? bobs Excel Discussion (Misc queries) 1 January 5th 05 09:42 PM
How can I copy page setup settings to other worksheets? Thanks Jeff Graham Excel Discussion (Misc queries) 1 December 30th 04 12:10 AM
Page Setup Gogetter20 Excel Discussion (Misc queries) 0 December 16th 04 08:43 PM
How do I copy page setup from one worksheet & paste into new shee. Rasc0 Excel Discussion (Misc queries) 2 December 1st 04 10:12 PM


All times are GMT +1. The time now is 04:16 PM.

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"