Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Excell 2003 Page Setup Slow

I read on Google that this is a known issue with Excel, but I couldn't find any suggestions that worked for 2003 or that made a noticeable impact. Here's the code I'm using:

With m_xlSheet.PageSetup
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(0.5)
.Orientation = xlLandscape
End With

This code runs 4 times (once each for 4 worksheets). I'm running it from a VB DLL. I have already set

m_xlApp.ScreenUpdating = False

but this didn't make much of a difference -- likely because the entire workbook is not visible until the end of my code.

Without the page setup code, it takes 4 seconds to create a new workbook, 4 sheets, and populate them with data. With the page setup the time goes to 9 seconds.

Any ideas? Thanks,

--
JT Lovell


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Excell 2003 Page Setup Slow

Take a look he

http://www.mcgimpsey.com/excel/pagesetup.html


In article ,
"JT Lovell" wrote:

I read on Google that this is a known issue with Excel, but I couldn't find
any suggestions that worked for 2003 or that made a noticeable impact.
Here's the code I'm using:

With m xlSheet.PageSetup
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(0.5)
.Orientation = xlLandscape
End With

This code runs 4 times (once each for 4 worksheets). I'm running it from a
VB DLL. I have already set

m xlApp.ScreenUpdating = False

but this didn't make much of a difference -- likely because the entire
workbook is not visible until the end of my code.

Without the page setup code, it takes 4 seconds to create a new workbook, 4
sheets, and populate them with data. With the page setup the time goes to 9
seconds.

Any ideas? Thanks,

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Excell 2003 Page Setup Slow

Thank you for the reply! I've tested the code using the Excel4 syntax and
here are the results:

6 seconds to run with no page setup formatting
11 seconds to run with VBA page setup formatting
9 seconds to run with Excel4 macro page setup formatting.

The code I'm using now is:

strMacro = "PAGE.SETUP(,,.5,.5,.5,.5,,,,,2,,,,,,,,,,)"
m_xlApp.ExecuteExcel4Macro strMacro

This is definitely an improvement, but is there any way to shave additional
time off? Would using a template with pre-setup page formatting improve the
overall speed, or would it break even given having to load the template?

Thanks for your help!

--
JT Lovell


"JE McGimpsey" wrote in message
...
Take a look he

http://www.mcgimpsey.com/excel/pagesetup.html


In article ,
"JT Lovell" wrote:

I read on Google that this is a known issue with Excel, but I couldn't

find
any suggestions that worked for 2003 or that made a noticeable impact.
Here's the code I'm using:

With m xlSheet.PageSetup
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(0.5)
.Orientation = xlLandscape
End With

This code runs 4 times (once each for 4 worksheets). I'm running it

from a
VB DLL. I have already set

m xlApp.ScreenUpdating = False

but this didn't make much of a difference -- likely because the entire
workbook is not visible until the end of my code.

Without the page setup code, it takes 4 seconds to create a new

workbook, 4
sheets, and populate them with data. With the page setup the time goes

to 9
seconds.

Any ideas? Thanks,



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excell 2003 Page Setup Slow

I would guess the template would be faster than either pagesetup or the xl4
macro. But why not just try it?

--
Regards,
Tom Ogilvy

"JT Lovell" wrote in message
...
Thank you for the reply! I've tested the code using the Excel4 syntax and
here are the results:

6 seconds to run with no page setup formatting
11 seconds to run with VBA page setup formatting
9 seconds to run with Excel4 macro page setup formatting.

The code I'm using now is:

strMacro = "PAGE.SETUP(,,.5,.5,.5,.5,,,,,2,,,,,,,,,,)"
m_xlApp.ExecuteExcel4Macro strMacro

This is definitely an improvement, but is there any way to shave

additional
time off? Would using a template with pre-setup page formatting improve

the
overall speed, or would it break even given having to load the template?

Thanks for your help!

--
JT Lovell


"JE McGimpsey" wrote in message
...
Take a look he

http://www.mcgimpsey.com/excel/pagesetup.html


In article ,
"JT Lovell" wrote:

I read on Google that this is a known issue with Excel, but I couldn't

find
any suggestions that worked for 2003 or that made a noticeable impact.
Here's the code I'm using:

With m xlSheet.PageSetup
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(0.5)
.Orientation = xlLandscape
End With

This code runs 4 times (once each for 4 worksheets). I'm running it

from a
VB DLL. I have already set

m xlApp.ScreenUpdating = False

but this didn't make much of a difference -- likely because the entire


workbook is not visible until the end of my code.

Without the page setup code, it takes 4 seconds to create a new

workbook, 4
sheets, and populate them with data. With the page setup the time

goes
to 9
seconds.

Any ideas? Thanks,





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Excell 2003 Page Setup Slow

Whenever you create a new workbook and/or worksheet Excel bases it on
an existing template. There should be little or no speed difference
whether the template is the default or one you specify in your code.

jmac

"JT Lovell" wrote in message ...
Thank you for the reply! I've tested the code using the Excel4 syntax and
here are the results:

6 seconds to run with no page setup formatting
11 seconds to run with VBA page setup formatting
9 seconds to run with Excel4 macro page setup formatting.

The code I'm using now is:

strMacro = "PAGE.SETUP(,,.5,.5,.5,.5,,,,,2,,,,,,,,,,)"
m_xlApp.ExecuteExcel4Macro strMacro

This is definitely an improvement, but is there any way to shave additional
time off? Would using a template with pre-setup page formatting improve the
overall speed, or would it break even given having to load the template?

Thanks for your help!

--
JT Lovell


"JE McGimpsey" wrote in message
...
Take a look he

http://www.mcgimpsey.com/excel/pagesetup.html


In article ,
"JT Lovell" wrote:

I read on Google that this is a known issue with Excel, but I couldn't

find
any suggestions that worked for 2003 or that made a noticeable impact.
Here's the code I'm using:

With m xlSheet.PageSetup
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(0.5)
.Orientation = xlLandscape
End With

This code runs 4 times (once each for 4 worksheets). I'm running it

from a
VB DLL. I have already set

m xlApp.ScreenUpdating = False

but this didn't make much of a difference -- likely because the entire
workbook is not visible until the end of my code.

Without the page setup code, it takes 4 seconds to create a new

workbook, 4
sheets, and populate them with data. With the page setup the time goes

to 9
seconds.

Any ideas? Thanks,



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Excell 2003 Page Setup Slow

Good to know, thanks!

--
JT Lovell


"jmac" wrote in message
om...
Whenever you create a new workbook and/or worksheet Excel bases it on
an existing template. There should be little or no speed difference
whether the template is the default or one you specify in your code.

jmac

"JT Lovell" wrote in message

...
Thank you for the reply! I've tested the code using the Excel4 syntax

and
here are the results:

6 seconds to run with no page setup formatting
11 seconds to run with VBA page setup formatting
9 seconds to run with Excel4 macro page setup formatting.

The code I'm using now is:

strMacro = "PAGE.SETUP(,,.5,.5,.5,.5,,,,,2,,,,,,,,,,)"
m_xlApp.ExecuteExcel4Macro strMacro

This is definitely an improvement, but is there any way to shave

additional
time off? Would using a template with pre-setup page formatting improve

the
overall speed, or would it break even given having to load the template?

Thanks for your help!

--
JT Lovell


"JE McGimpsey" wrote in message
...
Take a look he

http://www.mcgimpsey.com/excel/pagesetup.html


In article ,
"JT Lovell" wrote:

I read on Google that this is a known issue with Excel, but I

couldn't
find
any suggestions that worked for 2003 or that made a noticeable

impact.
Here's the code I'm using:

With m xlSheet.PageSetup
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(0.5)
.Orientation = xlLandscape
End With

This code runs 4 times (once each for 4 worksheets). I'm running it

from a
VB DLL. I have already set

m xlApp.ScreenUpdating = False

but this didn't make much of a difference -- likely because the

entire
workbook is not visible until the end of my code.

Without the page setup code, it takes 4 seconds to create a new

workbook, 4
sheets, and populate them with data. With the page setup the time

goes
to 9
seconds.

Any ideas? Thanks,



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 690
Default Excell 2003 Page Setup Slow

JT. I am a big believer in using Sheet templates to avoid the speed
problems that you mention. Another benefit is that since you are already
working on the template, you can include Column headings, Formulas, Text, &
Formatting, and just about anything else. This allows you to remove a lot
of vba code since the work is already done. The .Add command can also
insert more than one sheet with the Count option.
Adding a sheet based on a Template was an undocumented, but very useful
feature of Excel.
However, I just installed Excel 2003 today. It looks like Microsoft has
finally now documented this nice feature. Yeah!

--
HTH
Dana DeLouis


"JT Lovell" wrote in message
...
Good to know, thanks!

--
JT Lovell


"jmac" wrote in message
om...
Whenever you create a new workbook and/or worksheet Excel bases it on
an existing template. There should be little or no speed difference
whether the template is the default or one you specify in your code.

jmac

"JT Lovell" wrote in message

...
Thank you for the reply! I've tested the code using the Excel4 syntax

and
here are the results:

6 seconds to run with no page setup formatting
11 seconds to run with VBA page setup formatting
9 seconds to run with Excel4 macro page setup formatting.

The code I'm using now is:

strMacro = "PAGE.SETUP(,,.5,.5,.5,.5,,,,,2,,,,,,,,,,)"
m_xlApp.ExecuteExcel4Macro strMacro

This is definitely an improvement, but is there any way to shave

additional
time off? Would using a template with pre-setup page formatting
improve

the
overall speed, or would it break even given having to load the
template?

Thanks for your help!

--
JT Lovell


"JE McGimpsey" wrote in message
...
Take a look he

http://www.mcgimpsey.com/excel/pagesetup.html


In article ,
"JT Lovell" wrote:

I read on Google that this is a known issue with Excel, but I

couldn't
find
any suggestions that worked for 2003 or that made a noticeable

impact.
Here's the code I'm using:

With m xlSheet.PageSetup
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(0.5)
.Orientation = xlLandscape
End With

This code runs 4 times (once each for 4 worksheets). I'm running
it
from a
VB DLL. I have already set

m xlApp.ScreenUpdating = False

but this didn't make much of a difference -- likely because the

entire
workbook is not visible until the end of my code.

Without the page setup code, it takes 4 seconds to create a new
workbook, 4
sheets, and populate them with data. With the page setup the time

goes
to 9
seconds.

Any ideas? Thanks,





Reply
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
EXcel 2003 Page setup slow Ian Excel Discussion (Misc queries) 5 April 22nd 10 12:48 PM
Page Setup Macro runs slow William G Excel Discussion (Misc queries) 3 March 31st 09 07:31 PM
Page Setup SLOW trying excel 4..... [email protected] New Users to Excel 0 February 20th 08 10:54 PM
Excell Page setup Sameer[_3_] Excel Worksheet Functions 1 August 9th 07 12:48 PM
Excel 2003 Page SetUp not functioning Shep Excel Discussion (Misc queries) 6 December 9th 05 03:38 PM


All times are GMT +1. The time now is 03:44 PM.

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"