Activesheet.pagesetup slow


















Finally, I noticed that, in one instance after running my print macro, my other macros invoked separately - not called by this macro also slowed down - but this only happened once in several tests. Any ideas? Thanks in advance. Excel Facts. Return population for a City. Click here to reveal answer. If you have a list of cities in A2:A, use Data, Geography. Population and copy down. Joined Feb 10, Messages 4, Print setup can be slow depending on a number of things. I won't go into all of them but A couple of things to try and speed things up 1 Don't display pagebreaks.

Uses old XL 4 macros function Code:. Setup ""Hello"",""Testing"",0. Many thanks. That did the trick So your other macros use to run faster before this update?? Unsure why, can you post the code that is running slower?

Wish I could I believe it has something to do with the network and not the code you sent me. I was having this problem intermittently using the orginal print macro I had. I searched on that topic and discovered that others have found printing to network printers has caused slowdowns running Excel.

Unfortunately, none of these posts were particular to using macros and the suggestions to correct the issue in Excel didn't really apply.

Using the original print macro, I tried running it on another's PC and while it ran slow on their PC too, it didn't seem to cause the slow down with the other macros afterward like it did on my PC sometimes. I am going to take the new code and try running on another PC and see if I have similar problems. Maybe it's environmental. Again, many thanks for your help. Joined Sep 21, Messages Re: Speeding up Page Setup I have tried this code and can not get it to work for me!

The only think I can think would be that I set the print area before the page set up code. Setup "","",0. I read somewhere about an array? Sub test With Worksheets 1. InchesToPoints Tuesday, December 9, AM. Hi , There a additional comment from my colleague. In order increase the performance, we could try to turn off the UI update when we change the UI setting : Application.

Tuesday, December 30, AM. Proposed as answer by martinitram Friday, March 12, PM. Wednesday, February 24, PM. I've had the same problem and, inspired bij 'Anonymous -nice name-, I came up with a workable solution.

Try this:. Proposed as answer by evohnave Friday, July 20, PM. Friday, March 12, PM. Yes, the PageSetup properties are very slow when you set them. ScreenUpdating Application. Calculation Application. PageSetup If. End With Application. Hope this helps Improve this answer. Mike Rosenblum Mike Rosenblum I was able to get quite an increase, most of my sets were non-boolean values, do you know if Print Setup is by sheet or workbook? Hey Lance, yes, you can get a very big improvement by following this approach -- I'm glad it worked for you.

The Worksheeet class has a PageSetup property, but the Workbook class does not. In addition to Mike's answer, my understanding is that PageSetup could be made faster by turning off events.

I can't find the link, but there should be a MSKB article somewhere stating something like "PageSetup calls an event each time it's called". So turning off events might add a bit of speed as well. Activate With SourceSheet. PageSetup ' End With SourceSheet. Select Application. Dialogs xlDialogPageSetup. Add tempSheet. Activate With tempSheet. End With SourceBook. Show tempSheet. Sign up or log in Sign up using Google.



0コメント

  • 1000 / 1000