J
jwilkes
Hi,
To copy a footer and other page setups across to a new sheet proved
very slow, so I incorporated excel 4, however, I cannot work out how
to set the footer by reference rather than characers.... This is my
original that works very slow:
ActiveSheet.DisplayPageBreaks = False
Application.ScreenUpdating = False
With newWks.PageSetup
.PrintTitleRows = oldWks.PageSetup.PrintTitleRows
.PrintTitleColumns = oldWks.PageSetup.PrintTitleColumns
.LeftHeader = oldWks.PageSetup.LeftHeader
.CenterHeader = oldWks.PageSetup.CenterHeader
.RightHeader = oldWks.PageSetup.RightHeader
.LeftFooter = oldWks.PageSetup.LeftFooter
.CenterFooter = oldWks.PageSetup.CenterFooter
.RightFooter = oldWks.PageSetup.RightFooter
.Orientation = oldWks.PageSetup.Orientation
.Draft = oldWks.PageSetup.Draft
.PaperSize = oldWks.PageSetup.PaperSize
.Zoom = oldWks.PageSetup.Zoom
.FitToPagesWide = oldWks.PageSetup.FitToPagesWide
.FitToPagesTall = oldWks.PageSetup.FitToPagesTall
End With
Application.ScreenUpdating = True
ActiveSheet.DisplayPageBreaks = False
And this si the excel 4, (THANKS DAVID), but I am not sure how to
referense oldWks values like i have done in the slower way.....
'head = ""
'foot = """&Lwhateva"""
'pLeft = 0.54
'pRight = 0.3
'Top = 0.4
'bot = 0.36
'head_margin = 0.22
'foot_margin = 0.17
'hdng = False
'grid = False
'Notes = False
'quality = ""
'h_cntr = False
'v_cntr = False
'orient = 2
'Draft = False
'paper_size = 1
'pg_num = """Auto"""
'pg_order = 1
'bw_cells = False
'pscale = True
'pSetUp = "PAGE.SETUP(" & head & "," & foot & "," & pLeft & "," &
pRight & ","
'pSetUp = pSetUp & Top & "," & bot & "," & hdng & "," & grid &
"," & h_cntr & ","
'pSetUp = pSetUp & v_cntr & "," & orient & "," & paper_size & ","
& pscale & ","
'pSetUp = pSetUp & pg_num & "," & pg_order & "," & bw_cells & ","
& quality & ","
'pSetUp = pSetUp & head_margin & "," & foot_margin & "," & Notes &
"," & Draft & ")"
Thanks
To copy a footer and other page setups across to a new sheet proved
very slow, so I incorporated excel 4, however, I cannot work out how
to set the footer by reference rather than characers.... This is my
original that works very slow:
ActiveSheet.DisplayPageBreaks = False
Application.ScreenUpdating = False
With newWks.PageSetup
.PrintTitleRows = oldWks.PageSetup.PrintTitleRows
.PrintTitleColumns = oldWks.PageSetup.PrintTitleColumns
.LeftHeader = oldWks.PageSetup.LeftHeader
.CenterHeader = oldWks.PageSetup.CenterHeader
.RightHeader = oldWks.PageSetup.RightHeader
.LeftFooter = oldWks.PageSetup.LeftFooter
.CenterFooter = oldWks.PageSetup.CenterFooter
.RightFooter = oldWks.PageSetup.RightFooter
.Orientation = oldWks.PageSetup.Orientation
.Draft = oldWks.PageSetup.Draft
.PaperSize = oldWks.PageSetup.PaperSize
.Zoom = oldWks.PageSetup.Zoom
.FitToPagesWide = oldWks.PageSetup.FitToPagesWide
.FitToPagesTall = oldWks.PageSetup.FitToPagesTall
End With
Application.ScreenUpdating = True
ActiveSheet.DisplayPageBreaks = False
And this si the excel 4, (THANKS DAVID), but I am not sure how to
referense oldWks values like i have done in the slower way.....
'head = ""
'foot = """&Lwhateva"""
'pLeft = 0.54
'pRight = 0.3
'Top = 0.4
'bot = 0.36
'head_margin = 0.22
'foot_margin = 0.17
'hdng = False
'grid = False
'Notes = False
'quality = ""
'h_cntr = False
'v_cntr = False
'orient = 2
'Draft = False
'paper_size = 1
'pg_num = """Auto"""
'pg_order = 1
'bw_cells = False
'pscale = True
'pSetUp = "PAGE.SETUP(" & head & "," & foot & "," & pLeft & "," &
pRight & ","
'pSetUp = pSetUp & Top & "," & bot & "," & hdng & "," & grid &
"," & h_cntr & ","
'pSetUp = pSetUp & v_cntr & "," & orient & "," & paper_size & ","
& pscale & ","
'pSetUp = pSetUp & pg_num & "," & pg_order & "," & bw_cells & ","
& quality & ","
'pSetUp = pSetUp & head_margin & "," & foot_margin & "," & Notes &
"," & Draft & ")"
Thanks