Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
bellamere
 
Posts: n/a
Default How do I save one page out of a 80 page report in excel?

I have a large report in excel and I'd like to pull out a couple of pages to
send as an attachment. Can't find how to do this. Can someone help? Thanks:-)
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Peter Ellis
 
Posts: n/a
Default How do I save one page out of a 80 page report in excel?

You might want to try the Edit menu | Move or Copy sheet option, copying the
intended worksheets to another workbook, then send THAT workbook as an
attachment.

If you want only part of a worksheet, use copy and paste into a new workbook
and send that.


"bellamere" wrote:

I have a large report in excel and I'd like to pull out a couple of pages to
send as an attachment. Can't find how to do this. Can someone help? Thanks:-)

  #3   Report Post  
Posted to microsoft.public.excel.newusers
Ron de Bruin
 
Posts: n/a
Default How do I save one page out of a 80 page report in excel?

Hi bellamere

Try this tester that will copy page 4 to a new sheet
No error check to see if page 4 exist in this example

You can send this sheet with code or with my Add-in
http://www.rondebruin.nl/sendmail.htm


Sub Test_HPageBreak()
Dim HPB As HPageBreak
Dim RW As Long
Dim PageNum As Long
Dim WB As Workbook
Dim Asheet As Worksheet
Dim Nsheet As Worksheet
Dim Acell As Range

Set Asheet = ActiveSheet
If Asheet.HPageBreaks.Count = 0 Then
MsgBox "There are no HPageBreaks"
Exit Sub
End If
Application.ScreenUpdating = False
Set WB = ActiveWorkbook
'Because of this bug we select a cell below your data
'http://support.microsoft.com/default.aspx?scid=kb;en-us;210663
Set Acell = ActiveCell
Application.Goto Range("A" & Rows.Count), True
RW = 1
PageNum = 1
For Each HPB In Asheet.HPageBreaks
If PageNum = 4 Then
Set Nsheet = Worksheets.Add(after:=WB.Sheets(WB.Sheets.Count))
On Error Resume Next
Nsheet.Name = "Page " & PageNum
If Err.Number 0 Then
MsgBox "Change the name of : " & Nsheet.Name & " manually"
Err.Clear
End If
On Error GoTo 0
With Asheet
.Range(.Cells(RW, "A"), .Cells(HPB.Location.Row - 1, "K")).Copy _
Nsheet.Cells(1)
End With
' If you want to make values of your formulas use this line also
' Nsheet.UsedRange.Value = Nsheet.UsedRange.Value
End If

RW = HPB.Location.Row
PageNum = PageNum + 1
Next HPB
Asheet.Select
Asheet.DisplayPageBreaks = False
Application.Goto Acell, True
Application.ScreenUpdating = True
End Sub




--
Regards Ron de Bruin
http://www.rondebruin.nl


"bellamere" wrote in message ...
I have a large report in excel and I'd like to pull out a couple of pages to
send as an attachment. Can't find how to do this. Can someone help? Thanks:-)



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
Cursor doesn't move when page up or page down in Excel 2003 christiandad Excel Discussion (Misc queries) 3 December 12th 05 04:01 PM
Pivot Table report discarded in Excel 2003 - any fix available? Desperate Don Excel Discussion (Misc queries) 3 November 30th 05 07:10 PM
How do I save excel as HTML (but not as a full web page)? dls New Users to Excel 2 August 18th 05 12:07 AM
Open excel from htm page den Excel Discussion (Misc queries) 0 April 25th 05 11:58 PM
Using freezed panes in excel, how do I save the page as HTML? Jaffa„˘ Excel Discussion (Misc queries) 1 January 21st 05 09:25 AM


All times are GMT +1. The time now is 10:05 PM.

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"