Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I'm a very very basic macro user, i usually record and then try to manipulate
the macro. Question is how do you make a global change to all work sheets that are being created by a macro. I have 117 worksheets being created by a macro and need all the sheets to be formatted a certain way. When the data is copied in i have each sheet changing the refrence # in cell D6. This creates different data in each sheet. when i recorded the format of the page. it came up with the following. I have to copy it 117 times to get it to work. Can this formatting be looped? Each sheet has a different name. Sheets("Sheet1").Select Sheets("Sheet1").Name = "Investor #1" ActiveSheet.PageSetup.PrintArea = "$B$2:$Z$57" With ActiveSheet.PageSetup .LeftHeader = "" .CenterHeader = "" .RightHeader = "" .LeftFooter = "" .CenterFooter = "" .RightFooter = "" .LeftMargin = Application.InchesToPoints(0.5) .RightMargin = Application.InchesToPoints(0.5) .TopMargin = Application.InchesToPoints(0.75) .BottomMargin = Application.InchesToPoints(0.75) .HeaderMargin = Application.InchesToPoints(0.5) .FooterMargin = Application.InchesToPoints(0.5) .PrintHeadings = False .PrintGridlines = False .PrintComments = xlPrintNoComments .PrintQuality = 600 .CenterHorizontally = False .CenterVertically = False .Orientation = xlLandscape .Draft = False .PaperSize = xlPaperLetter .FirstPageNumber = xlAutomatic .Order = xlDownThenOver .BlackAndWhite = False .Zoom = False .FitToPagesWide = 1 .FitToPagesTall = 1 .PrintErrors = xlPrintErrorsDisplayed End With This is repeated for each sheet to change from sheet # to Investor name. I keep getting the message, function too long, so i have to break it up into three macro's and then they and call the 3 macro's but it still stops after the 1st one. I have to maulaly start the 2nd and 3rd one even though i have a buttion assigned to the call all three macros. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to move rows from one sheet to another sheet (macro) | Excel Discussion (Misc queries) | |||
need template for investor payback schedule | Excel Worksheet Functions | |||
macro to: Add new sheet, then rename new sheet with todays date | Excel Worksheet Functions | |||
2 questions, copying data from sheet to sheet and assigning macro | Excel Worksheet Functions | |||
Macro, select Sheet "Number", NOT Sheet Name | Excel Worksheet Functions |