#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default break page

Hi,
I have another problem,example the word 'signature' is always in the same
column but it changes row.
I wont to do a break page in the same row when the word 'signature' arise!
End last question is...how can I lock view code,that no one can use it!
Thanks in advance!
Mery
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default break page

This code will insert a pagebreak below the word Signature in column A

Sub Insert_PBreak()
Dim OldVal As String
Dim rng As Range
OldVal = "Signature"
For Each rng In Range("A1:A300") '<< change range
If rng.text = OldVal Then
rng.Offset(1, 0).PageBreak = xlPageBreakManual
End If
Next rng
End Sub

Second problem..................

Open the VBE.

Select your workbook/project and right-clickmyworkbook
propertiesprotectionlock project for viewing. Add a password and OK out.

Note: file must be saved, closed and re-opened before protection takes place.


Gord Dibben MS Excel MVP

On Sun, 6 Apr 2008 09:02:00 -0700, Mery wrote:

Hi,
I have another problem,example the word 'signature' is always in the same
column but it changes row.
I wont to do a break page in the same row when the word 'signature' arise!
End last question is...how can I lock view code,that no one can use it!
Thanks in advance!
Mery


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default break page

Thank you very much,it was very useful!


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
Excel 2007 Page Break Adjustments causes a page break each cell BKaufman Excel Worksheet Functions 2 September 10th 10 05:02 AM
How do I do page breaks when view menu doesnt page break preview HeatherF55 Excel Discussion (Misc queries) 0 September 21st 07 04:24 AM
change and/or remove page number watermark in page break preview juga Excel Discussion (Misc queries) 2 December 25th 06 10:15 AM
Hiding the page number in page break preview background. I need coffee, wake me up! Excel Discussion (Misc queries) 0 May 15th 06 10:32 AM
adding a new page break to an existing page break Edward Letendre Excel Discussion (Misc queries) 1 March 6th 05 09:29 AM


All times are GMT +1. The time now is 02:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"