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

In Excel I have a large spreadsheet that I need to have several different
views printed. I have set up the command buttons to hide appropriate columns
and set length to only the amount of data entered for rows. My problem begins
when I hide the columns. They do not hide in the way intended. Also the
VPageBreaks will not actually move over to where I want them making the data
display broken across several pages instead of one.

Could someone please check my code and see if there is something wrong with
it. No errors show up anywhere except execution.

Would appreciate any help at all.

Here is the code (E11 is valued at the last row number of data)

PrintAPFT Macro
' Macro recorded 9/9/2007 by derek.fassett
'
ActiveSheet.Unprotect Password:="***"
Columns("D:E").Select
Selection.EntireColumn.Hidden = True
Columns("G:G").Select
Selection.EntireColumn.Hidden = True
Columns("J:AG").Select
Selection.EntireColumn.Hidden = True
Columns("AI:AJ").Select
Selection.EntireColumn.Hidden = True
Range("A16:BD" & Range("E11").Value).Select
ActiveSheet.PageSetup.PrintArea = "$A$16:$BD$" & Range("E11").Value
ActiveSheet.VPageBreaks(1).Location = Worksheets(1).Range("bd1")
Selection.PrintOut Copies:=1, Preview:=True, Collate:=True
ActiveSheet.PageSetup.PrintArea = ""
Cells.Select
Range("A16").Activate
Selection.EntireColumn.Hidden = False
Range("A16").Select
ActiveSheet.Protect Password:="***", _
DrawingObjects:=True, Contents:=True, Scenarios:=True

End Sub
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
CUSTOM PRINTING ! jay dean Excel Programming 5 March 1st 07 06:55 AM
Custom Printing in a Macro Rich Excel Discussion (Misc queries) 7 January 12th 07 05:24 PM
printing on custom paper aschmitz New Users to Excel 4 March 8th 06 09:36 AM
printing custom copies pukka Excel Discussion (Misc queries) 0 November 2nd 05 09:53 PM
Printing Custom Header lfalgi Excel Discussion (Misc queries) 1 January 26th 05 12:16 AM


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