Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default Vertical Page Break

Rob

and.....

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Rob" wrote in message
...


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default Vertical Page Break

Rob

Would it not be simpler to hide the columns?

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Rob" wrote in message
...
Hello Nick:

I accidently hit the "Enter" key before I typed in my message. That is
the
reason for the "and.... "

My question is how to insert a vertical page break in a macro. I have the
macro set now so that it finds "Grand Total" which is in the last row and
then goes up to "home "and that sets the print area. However, on some of
my
worksheets, I don't want to print the whole sheet so I would like to
insert a
vertical page break eliminating some of the columns.

Here is the code that I have so far:

Cells.Find(What:="Grand Total", After:=ActiveCell, LookIn:=xlFormulas,
LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False, SearchFormat:=True).Activate
Range(Selection, Selection.Cells(1)).Select
ActiveSheet.PageSetup.PrintArea = ""
Range ("L1").select
ActiveSheet.VPageBreaks.Add Befo=ActiveCell

Everything works fine except the VPageBreak command. It doesn't do any
thing to the worksheet and I don't get an error message.

If you can, please help!!

rob

"Nick Hodge" wrote:

Rob

and.....

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Rob" wrote in message
...



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
Vertical page breaks won't drag in Page Break Preview Caroline Excel Discussion (Misc queries) 0 July 14th 09 12:19 PM
How do I remove unnecessary vertical page break? 1smstewart1 Excel Worksheet Functions 2 November 15th 06 06:09 PM
Removing A Vertical Page Break That Won't Go! blondie1 New Users to Excel 5 August 7th 06 07:33 AM
vertical page break tom Excel Discussion (Misc queries) 1 August 6th 06 04:52 AM
detecting a vertical page break Marc Antheunis Excel Programming 1 November 26th 03 02:45 PM


All times are GMT +1. The time now is 11:29 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"