Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have an Excel file in which a worksheet contains 365 identical tables
except for the date. I wish to make all these tables individual print areas i.e end up with 365 print areas. I wish to do this automatically using VBA code. My only attempt to was use the following code on each table using a loop. Sub PrintArea() Application.ScreenUpdating = False Worksheets("Sheet1").Activate For t = 1 To 13141 Step 36 Range("A1")(t).Activate ActiveSheet.PageSetup.PrintArea = ActiveCell.CurrentRegion.Address Next t Application.ScreenUpdating = True End Sub I used Step Into to view the operation of the code one line at a time. Unfortunately as soon as the second table became a print area the first table print area was deselected As soon as the third table became a print area the second table print area was deselected and so on. The result of running the code was simply to make the last table a print area. Any suggestions please ? I am quite willing to upload a copy of the file if this is at all possible. -- FLYNNE |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do I print multiple print areas on one page | Excel Discussion (Misc queries) | |||
Can I adjust print scaling for multiple print areas on the same sh | Excel Discussion (Misc queries) | |||
Need to print a workbook but worksheets have diff print areas | Excel Discussion (Misc queries) | |||
printing multiple print areas with a print dialog box | Excel Programming | |||
Multiple print areas, one worksheet -need to print to PDF! | Excel Programming |