LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default Macro help - Investor sheet

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
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
How to move rows from one sheet to another sheet (macro) Stacey Excel Discussion (Misc queries) 1 December 30th 09 02:52 PM
need template for investor payback schedule Laura Excel Worksheet Functions 0 January 15th 09 03:52 PM
macro to: Add new sheet, then rename new sheet with todays date Paul Excel Worksheet Functions 3 September 29th 07 03:17 AM
2 questions, copying data from sheet to sheet and assigning macro Boris Excel Worksheet Functions 0 December 16th 04 06:11 PM
Macro, select Sheet "Number", NOT Sheet Name DAA Excel Worksheet Functions 4 November 30th 04 05:29 PM


All times are GMT +1. The time now is 09:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"