Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default Insert HPageBreaks

Hi Everyone
Is it at all possible to insert pagebreaks in multiple
places at the same time?
The code below does not work.
Range("A38,74").Select
ActiveWindow.SelectedSheets.HPageBreaks.Add _
Befo=ActiveCell

TIA

Bob XL2002


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default Insert HPageBreaks

No, but you can do this:

Dim cell As Range
For Each cell In Range("A38,A74")
ActiveWindow.SelectedSheets.HPageBreaks.Add cell
Next cell


In article ,
"Robert Christie" wrote:

Hi Everyone
Is it at all possible to insert pagebreaks in multiple
places at the same time?
The code below does not work.
Range("A38,74").Select
ActiveWindow.SelectedSheets.HPageBreaks.Add _
Befo=ActiveCell

TIA

Bob XL2002


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default Insert HPageBreaks

Hi J.e.
Thankyou for your quick reply.
I must try and get this old head of mine around the Dim'
For's and next's of this VBA.
Thanks again

Bob C.

-----Original Message-----
No, but you can do this:

Dim cell As Range
For Each cell In Range("A38,A74")
ActiveWindow.SelectedSheets.HPageBreaks.Add

cell
Next cell


In article ,
"Robert Christie"

wrote:

Hi Everyone
Is it at all possible to insert pagebreaks in multiple
places at the same time?
The code below does not work.
Range("A38,74").Select
ActiveWindow.SelectedSheets.HPageBreaks.Add _
Befo=ActiveCell

TIA

Bob XL2002


.

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
Intermittent Error - Method 'Add' of object 'HPageBreaks' failed Jamey Weare Excel Worksheet Functions 1 December 22nd 06 01:40 AM
Is there no one who uses PageBreaks? HPageBreaks? GeorGeorGe Excel Worksheet Functions 0 February 11th 05 05:53 PM
HPageBreaks.Add GeorGeorGe Excel Worksheet Functions 0 February 9th 05 09:31 PM
Can't set manual HPageBreaks J.E. McGimpsey Excel Programming 0 July 15th 03 03:52 PM
Can't set manual HPageBreaks J.E. McGimpsey Excel Programming 1 July 14th 03 08:12 PM


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