Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
CUSTOM PRINTING ! | Excel Programming | |||
Custom Printing in a Macro | Excel Discussion (Misc queries) | |||
printing on custom paper | New Users to Excel | |||
printing custom copies | Excel Discussion (Misc queries) | |||
Printing Custom Header | Excel Discussion (Misc queries) |