Speeding Up Page Setup

Jun 23, 2008

This part of my macro can be improved as it runs through over 100 sheets and takes a while?


Sheets.Select
For Each sh In Worksheets
With sh.PageSetup
.Zoom = False
.LeftFooter = "&F" & Chr(10) & "&A"
.CenterFooter = "&P of &N"
.RightFooter = "&D"
.FitToPagesWide = 1
.FitToPagesTall = 1
.LeftMargin = Application.InchesToPoints(0.15748031496063)
.RightMargin = Application.InchesToPoints(0.15748031496063)
.TopMargin = Application.InchesToPoints(0.393700787401575)
.BottomMargin = Application.InchesToPoints(0.354330708661417)
.HeaderMargin = Application.InchesToPoints(0.511811023622047)
.FooterMargin = Application.InchesToPoints(0.196850393700787)
.TopMargin = 1
.BottomMargin = 1
.Orientation = xlPortrait
End With
Next sh

View 9 Replies


ADVERTISEMENT

Excel Page Setup Up

Jun 16, 2009

This might seem a strange type of Excel question.

Some "Clever" person decided to create a site plan using MS Excel. It has been done quite well tbh. The problem with Excel is that I am unable to set a custom page size as this plan sits nicely on a paper size I made ealier through using Word. Guess what there is a custom page size selection on Word but not Excel. Is there a walkaround for this ?

The only other way I can do this, is to print off 2 a4 landcape print out but the printer goes to the next page and leaves a nasty seperation.

The copy of Excel i have is 2003 sp3

View 9 Replies View Related

Page Setup Changes On Different Machines

Jun 16, 2008

I set up a spreadsheet for use by my colleagues, on an Acer 17 inch portable. My colleagues all use HP or Dell with 15 inch monitors (and different graphics cards to mine). They all complained that when they opened my sheet, the page breaks were all in the wrong place. When they fixed the breaks on their machines and I opened those file, the breaks were now in the wrong place on mine, but were all right on theirs.

I have now "upgraded" to a Toshiba 17 inch laptop, and find that my original spreadsheet done on the Acer 17 inch shows page breaks in the wrong place on my new machine.

Is this something to do with display adaptors? If so, does anyone know what I can do to standardise this across the board? (My boss uses a 20 inch screen, and the sheet for him is even more wildly out).

View 9 Replies View Related

Using XLM4 Page Setup

Jan 8, 2009

I visited all of the sites listed in the various posts & downloaded the XLM function help file.

My question is which syntax would I use? I'm wanting to add this to an existing macro (one that currently takes FOREVER). I think syntax 1 for worksheets & macro sheets, but I'm adding to visual basic, so maybe syntax 3 for vb modules?

Here's my existing code, if anyone wants to help me change this to XLM4pageSetUp ..

View 9 Replies View Related

Protection For Page Setup

Jun 13, 2007

Is it possible to protect against users changing the page setup?

View 2 Replies View Related

Copy Page Setup From One Workbook To Another?

May 18, 2009

Is there a way to copy page setup settings from one workbook to another in VBA?

Example, I have a spreadsheet with 5 tabs with each of them different page setup options.

I have a second spreadsheet with 5 tabs where I need to make the page setup the same for each tab as the saved spreadsheet #1.

Background: This is a workaround for not being able to do copy/paste special values for pivot tables. My workaround is to save an .xlsx as a .mht then reopen and save as .xlsx. The only problem is that I lose page setups through the process.

View 4 Replies View Related

Coding The Page Setup Efficiently

Mar 7, 2008

I've managed to clean up my code removing all of the selecting to get the macro to run faster but it seems to slow down when it gets to the page setup. Is it because of the ActiveSheet? Is there a better way to code the following?

View 10 Replies View Related

Macro Gets Hung Up On Page Setup

Feb 21, 2009

Once a week I need to export data to excel for a report. Some weeks there may be 30 rows and other weeks there may be 100 rows. I created a macro in the attached spreadsheet called 247 formattedV2 that seems to work fine except that it seems to get caught up in the Page Set up area. Here is the things that I have already in the macro that need to be accomplished.

1.All cells should be set to wrap text
2.Bottom justify text on row 1 for wrap text
3.Top justify all rows below it for wrap text
4.Adjust width of columns to exactly what is shown. If text runs over, it should wrap (shown in parenthesis)
5.Center all titles at the top of each column - show with grey background as indicated
6.Center text in columns A, B & C
7.Lighten grey cell in beteen each call (keep them in for all notes, they were accidently removed in this version)
8.Darken grey cell for column headers

Page setup: Set margins to narrow setting at .25 top, bottom, left, right. Set to landscape. Should be 1 page width, as many as necessary for height

Set for 8.5x14 paper (legal size)

Column Widths
•A - Last Call Date (w=10),
•B - Priority (w=7),.............

View 4 Replies View Related

Copy Page Setup From One Workbook To Another

May 18, 2009

Is there a way to copy page setup settings from one workbook to another in VBA?

Example, I have a spreadsheet with 5 tabs with each of them different page setup options.

I have a second spreadsheet with 5 tabs where I need to make the page setup the same for each tab as the saved spreadsheet #1.

Background: This is a workaround for not being able to do copy/paste special values for pivot tables. My workaround is to save an .xlsx as a .mht then reopen and save as .xlsx.

View 2 Replies View Related

Page Setup Multiple Sheets

Jan 27, 2010

I have an 6 sheet excel workbook that generates 27 additional sheets upon an executed macro. I am trying to page setup the additonal 27 sheets only to a zoom of 90. Here is what I have so far but this zooms all 33 sheets.

HTML Sub zoom_2()
Application.ScreenUpdating = False

Dim wk As Worksheet
For Each wk In ThisWorkbook.Worksheets
wk.Activate
With ActiveSheet.PageSetup
.zoom = 90 End With
Range("A1").Select
Next wk
Sheets("data").Activate
End Sub

View 2 Replies View Related

Page Setup/Print Preview Vba

Apr 2, 2005

I am testing some code to have my sheets print consistently on different computers. I have

With ActiveSheet.PageSetup
.CenterHorizontally = True
.Orientation = xlPortrait
.FitToPagesWide = 1
End With
ActiveSheet.PrintPreview

but it still previews at more than 1 page wide. Any suggestions?

View 9 Replies View Related

Page Setup And Zoom Property

Nov 19, 2003

I was curious if in VBA is there a way to switch in the page setup from Fit to X Page by X Page to the Scaling %.

I have set all my pages to fit 1 x 1 and would now like to know the scaling % (Zoom) of the sheets.

View 9 Replies View Related

Changing Page Setup In Another Workbook

Jul 22, 2006

can anyone show me the way to run a macro when visual basic editor opens

View 5 Replies View Related

Copy Page Setup Settings From One Workbook To Another?

Apr 8, 2008

I generate several reports, all saved as seperate files, with the same page settings (margins, headers, footers, etc.). Is there any way to copy these page settings from one file to another so that I don't have to enter the settings seperately for each file?

View 13 Replies View Related

How To Properly Setup Page To Get Accurate Cashflow

Dec 25, 2013

I am looking to create an invoice details in excel where it correlates to the payment schedule. and the schedule is biweekly starting jan 3rd

I want to also match the start dates to each invoice date, where the invoice date is every 7 days (on a weekly basis)
But, I'm looking to have the invoice date driven in accordance to the employees start date

I'm doing this for a friend, but i'm not sure exactly what he is looking for, and what I have to do in excel

Does he just want me to keep on filling out employee 5 to finish the process?

Or should I create a separate column for each employee for it to be more detailed?

The Overall goal is to get an accurate cashflow

Attached can see what excel sheet looks like : excel.jpg‎

View 1 Replies View Related

VBA To Setup Page Margins And Printout To Match It

Sep 3, 2012

I have a vba to do page set-up:

*Left, Top, Right, Bootom as 0.5
*Header and Footer as 0.2

Once vba is run page set-up is ok ie margins but when printed Left and right margins are not 0.5cm.

solve this mystery?

Code:

Sub Print_Format()
Dim myRange As String
myRange = Selection.Address
ActiveSheet.PageSetup.PrintArea = myRange
With ActiveSheet.PageSetup

[Code]...

View 2 Replies View Related

How To Set Page Setup To Print Multiple Pages

Jan 25, 2013

I have data range which have three sections identical in shape and size.

How should i set the page setup so that each section print on a separate page.

View 1 Replies View Related

Macro To Print Page Setup Area

Apr 2, 2014

My macro "prints" (saves) my sheet as Pdf-file.

I wish to improve this such as print/save is based on the active area I choose at the time.

Now I must hide a lot of columns (show only the ones I will print) before "printing":

Columns("A:Z").Select
ActiveSheet.PageSetup.PrintArea = "$A:$Z"

I just want to select some columns and set this range as a print.setup area.

View 2 Replies View Related

Changing Page Setup For Multiple Worksheets In Workbook?

Mar 7, 2006

I am trying to change the page set up setiings to fit to 1 page for 56 worksheets within a workbook.

View 7 Replies View Related

Page Break Preview It Shows The Page Numbers In The Centre Of The Page

Jun 9, 2009

When I view a sheet under Page Break Preview, it shows the Page numbers in the centre of the Page. While I am aware that it would not print the page number I was wondering if there is an option to remove/hide the page numbers.

View 3 Replies View Related

Speeding Up VBA

Jul 16, 2007

I've been working on the following code and need to find a way to speed it up.

The premise is that I have a list of columns (From C2 to potentially EH and beyond) and these columns will contain the values Y, N, end or nothing. I'm looking for the quickest way to zap along the columns and delete all that have an N and to stop when end or "" is reached.

There are 2 versions as I'm not sure which one is best ...

Range("B2").Select
LastColumn = Range("A1").End(xlToRight).Offset(, 1).Column
For k = 2 To LastColumn
ActiveCell.Offset(0, 1).Select ' right 1
If ActiveCell.Value = "Y" Then Next k
End If
If ActiveCell.Value = "N" Then
ActiveCell.EntireColumn.Delete 'If employee has no sickness then delete column
ActiveCell.Offset(0, -1).Select
End If
If ActiveCell.Value = "end" Then Exit For
If ActiveCell.Value = "" Then Exit For
Next k
or a longer version

StripSickness:
Range("B2").Select
ActiveCell.Offset(0, 1).Select ' right 1
PrintView = ActiveCell.Value 'Y/N whether employee has data
If PrintView = "Y" Then GoTo StripSickness
If PrintView = "N" Then GoTo NotNeeded
If PrintView = "End" Then GoTo Complete 'last column shows "end"
If PrintView = "" Then GoTo Complete

NotNeeded:
ActiveCell.EntireColumn.Delete
ActiveCell.Offset(0, -1).Select
GoTo StripSickness 'once employee is deleted, go back to stripsickness process

Complete:
Range("a1").Select

View 9 Replies View Related

Speeding Up Macro's

Mar 13, 2008

This may be a long shot, but I've been working on a macro today which runs a few Vlookups, does some copying and pasting and some re-aligning....basically nothing too complicated. The Vlookup is looking through approx 45,000 records and returning about 200 - 300 on average, this info returned is company name, address, contact info etc etc.

This macro is taking a ludicrously long time to run, I've checked through and removed any coding that I think is unnecessary without altering the final outcome of the macro.

It still takes ages. Has anyone got any ideas why this may be, or any tips of speeding it up?

I have a brand new computer, dual core processor, 2 gigs of ram etc so it shouldn't be performance of the machine slowing it down, and I ran it with the least applications open that I can (I'm at work so can't close everything, but none of the other applications are memory hogs or anything). I'm running on Office 2003 on Windows XP.

View 9 Replies View Related

Speeding Up A Macro

May 13, 2008

I am running a rather large simmulation where I have 12 for loops with each running between 0 and 100% with variable steps and the where the sum of the 12 variables has to sum to 100% and sometimes combinations of the sums of a few of the 12 have to sum up to specific values. That part works, now I am trying to get this to run faster.

Question:
Is there a different design that might be able to run this process more efficiently?
If not, is there a way to speed up the process by letting the computer know that all these variables are between 0 and 1 (or 100%) and that I only need 3 digits after the decimal if the value is in % form?

(the only problem with the rounding or cutting off the decimals at the end that I can think of is that it will only speed up the process a bit but will also make the summing upto 100% or any other value difficult)

View 9 Replies View Related

Speeding Up Vba Code

Jul 17, 2007

I've been working on cleaning up some code that copies particular information from one sheet (as the original must remain unedited) and then edits out irrelivant information.

However I've noticed that my "before" code moves far faster than my "after" code, which is odd considering that I've cleaned out a lot of excess code and the end results are the same.

I attach an example of my old fast code and my new slow code - can anyone advise where I have gone wrong ? Run the fast code first and then the slow one - you'll see the difference!

View 9 Replies View Related

Speeding Up Formatting Macro

Jun 28, 2007

I need help with speeding up my macro. I have been building this using alot of the recorder and the maco is just horribly sluggish. I don't know if it is possible, but it seems like it is. I need the macro to obviously work the same way. The way it has been recorded, the order of operation is important. But if any one knows how to do this better it would be a huge help. The slowest part is during the insertion of the formulas into col. J,K,&L takes like over 7min -- Macro does work perfect though.

View 9 Replies View Related

Speeding Up Multistep Loop

Aug 20, 2007

first, id like to thank the board for the help on setting up an array or ranges.

ive been able to get my code to work but its painfully slow...if anyone had any recommendations on speeding it up would appreciate it...i was playing around with using formulaarray instead of writing and reading the data on each loop but cant get it to work...and i'm not really even sure thats the right way to go.

i copied the entire code below...what i was doing was taking 8 time series and looping thru each one to calculate some basic statistics...i ran the function EDFlyRateFromPrice to calculate another series of data which i then run the standardize, max and min functions on.

View 9 Replies View Related

Row Hiding Macro, Speeding It Up?

Aug 23, 2007

This code is pretty slow if most rows have to be hidden. I'm certain there is a faster way to do this but I'm not seeing it.

What am I doing with
For each row from 12 to 236 I'm looking to see if there is data in any cell in columns A:F, H, & J. If not, I hide the row. I'm starting at row 236 and working up to 12 continuing to hide rows until I find data or I reach row 11. As soon as any row has data or row 11 is reached the the procedure ends leaving all remaining rows visible ...

View 9 Replies View Related

Speeding Up Macro Processing

Aug 27, 2009

Ive found a few ways to speed up the macro in my workbook thats taking about 40 minutes to process usually.

One way - Press Escape and it goes about twice as fast! - Wy does it do this?

Another way - Inserting these lines into the code -

Application.Calculation = xlCalculationManual
Application.Calculation = xlCalculationAutomatic

View 9 Replies View Related

Speeding Up Workbook With 12672 Sumifs

Mar 4, 2014

I am putting together a workbook which calculates a rota for 5 days that shows overall headcounts every 15mins.
It currently has 12672 cells containing SUMIFS.

But this takes a very long time to calculate.

Is there a faster / more efficient way for me to approach this task?

Can I attach the workbook so you can see what I mean?

View 1 Replies View Related

Speeding Up An Auto-delete Macro

Jul 14, 2008

Delete rows where column A and B are duplicated.

However, this runs extremely slow. I had to stop it after about 10 min, as it only got to about row 1000 of 20,000.

Sub Delete_Dupes()
Dim rw1 As Long: rw1 = 1
Dim rwx As Long: rwx = rw1
Dim stepx As Integer
Dim co1 As Integer: co1 = 1
Dim co2 As Integer: co2 = 2
Dim bool1 As Boolean
Dim bool2 As Boolean
Dim bool As Boolean
Dim count As Integer
count = 0
Do Until Cells(rwx, co1) = ""
stepx = 1
If rwx > rw1 Then
On Error GoTo NewCrit
bool1 = IsError(Application.WorksheetFunction.Match(Cells(rwx, co1), Range(Cells(rw1, co1), Cells(rwx - 1, co1)), 0))
bool2 = IsError(Application.WorksheetFunction.Match(Cells(rwx, co2), Range(Cells(rw1, co2), Cells(rwx - 1, co2)), 0)).................

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved