Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Inexpecting slow execution when writing to .PageSetup.Leftfooter

I have developped a VBA application in Excel which automates the process of
setting some part of the footer of newly created workbooks.

The problem I have is that the application becomes inexpectingly slow on
some machines. I identify that the following instruction is responsible for
the lack of performance:

Private Sub InsertClassification(iPageSetup As PageSetup, iLevel As String)
iPageSetup.LeftFooter = kFmt & iLevel & vbLf & iPageSetup.LeftFooter
End Sub

On some machines, it takes up to half a second to be executed, while it is
executed much faster on other.

Any idea ?

Thanks in advance

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default Inexpecting slow execution when writing to .PageSetup.Leftfooter

Alan

Pagesetup is notoriously slow on ALL machines. Some are quicker than others
as the calls to the print driver are more streamlined (HP are awful
generally).

You can use the old XLM commands in VBA which are much quicker. Cannot help
more at this point as I only came across XL at V5 with VBA and do not know
XLM macros

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"alan674" wrote in message
...
I have developped a VBA application in Excel which automates the process of
setting some part of the footer of newly created workbooks.

The problem I have is that the application becomes inexpectingly slow on
some machines. I identify that the following instruction is responsible
for
the lack of performance:

Private Sub InsertClassification(iPageSetup As PageSetup, iLevel As
String)
iPageSetup.LeftFooter = kFmt & iLevel & vbLf & iPageSetup.LeftFooter
End Sub

On some machines, it takes up to half a second to be executed, while it is
executed much faster on other.

Any idea ?

Thanks in advance



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Inexpecting slow execution when writing to .PageSetup.Leftfooter

Hi Nick,

You can use the old XLM commands in VBA which are much quicker.



I think the following Tom Ogilvy / John Green post supports your
suggestion:


http://tinyurl.com/93q24


---
Regards,
Norman



"Nick Hodge" wrote in message
...
Alan

Pagesetup is notoriously slow on ALL machines. Some are quicker than
others as the calls to the print driver are more streamlined (HP are awful
generally).

You can use the old XLM commands in VBA which are much quicker. Cannot
help more at this point as I only came across XL at V5 with VBA and do not
know XLM macros

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"alan674" wrote in message
...
I have developped a VBA application in Excel which automates the process
of
setting some part of the footer of newly created workbooks.

The problem I have is that the application becomes inexpectingly slow on
some machines. I identify that the following instruction is responsible
for
the lack of performance:

Private Sub InsertClassification(iPageSetup As PageSetup, iLevel As
String)
iPageSetup.LeftFooter = kFmt & iLevel & vbLf & iPageSetup.LeftFooter
End Sub

On some machines, it takes up to half a second to be executed, while it
is
executed much faster on other.

Any idea ?

Thanks in advance





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default Inexpecting slow execution when writing to .PageSetup.Leftfooter

Norman

Thanks for the detail....pre-dates my experience

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"Norman Jones" wrote in message
...
Hi Nick,

You can use the old XLM commands in VBA which are much quicker.



I think the following Tom Ogilvy / John Green post supports your
suggestion:


http://tinyurl.com/93q24


---
Regards,
Norman



"Nick Hodge" wrote in message
...
Alan

Pagesetup is notoriously slow on ALL machines. Some are quicker than
others as the calls to the print driver are more streamlined (HP are
awful generally).

You can use the old XLM commands in VBA which are much quicker. Cannot
help more at this point as I only came across XL at V5 with VBA and do
not know XLM macros

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"alan674" wrote in message
...
I have developped a VBA application in Excel which automates the process
of
setting some part of the footer of newly created workbooks.

The problem I have is that the application becomes inexpectingly slow on
some machines. I identify that the following instruction is responsible
for
the lack of performance:

Private Sub InsertClassification(iPageSetup As PageSetup, iLevel As
String)
iPageSetup.LeftFooter = kFmt & iLevel & vbLf & iPageSetup.LeftFooter
End Sub

On some machines, it takes up to half a second to be executed, while it
is
executed much faster on other.

Any idea ?

Thanks in advance







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Inexpecting slow execution when writing to .PageSetup.Leftfoot

Thank you very much for your help guys !

As I am an old developper, it reminded me a lot of things ! ;-

If I took an other printer than HP, macro works well and fast.
Unfortunately, Excel 4 macro didn't solve the problem with HP printers:
procedure is executed a bit faster but not so much... (still around 5 to 10
seconds for 12 sheets)

An other idea maybe ? I wonder if there were a mean to stop printer driver
operations during macro iterations through worksheets and then to restart it
to make final calculation ?

Alain

"Nick Hodge" wrote:

Norman

Thanks for the detail....pre-dates my experience

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"Norman Jones" wrote in message
...
Hi Nick,

You can use the old XLM commands in VBA which are much quicker.



I think the following Tom Ogilvy / John Green post supports your
suggestion:


http://tinyurl.com/93q24


---
Regards,
Norman



"Nick Hodge" wrote in message
...
Alan

Pagesetup is notoriously slow on ALL machines. Some are quicker than
others as the calls to the print driver are more streamlined (HP are
awful generally).

You can use the old XLM commands in VBA which are much quicker. Cannot
help more at this point as I only came across XL at V5 with VBA and do
not know XLM macros

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"alan674" wrote in message
...
I have developped a VBA application in Excel which automates the process
of
setting some part of the footer of newly created workbooks.

The problem I have is that the application becomes inexpectingly slow on
some machines. I identify that the following instruction is responsible
for
the lack of performance:

Private Sub InsertClassification(iPageSetup As PageSetup, iLevel As
String)
iPageSetup.LeftFooter = kFmt & iLevel & vbLf & iPageSetup.LeftFooter
End Sub

On some machines, it takes up to half a second to be executed, while it
is
executed much faster on other.

Any idea ?

Thanks in advance










  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 233
Default Inexpecting slow execution when writing to .PageSetup.Leftfoot

Maybe change printer driver before doing the setup and then change back
again?

DM Unseen

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 233
Default Inexpecting slow execution when writing to .PageSetup.Leftfoot

Change printer driver before doing the setup and then change back
again?

DM Unseen

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 233
Default Inexpecting slow execution when writing to .PageSetup.Leftfoot

Change printer driver before doing the setup and then change back
again?

DM Unseen

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 233
Default Inexpecting slow execution when writing to .PageSetup.Leftfoot

Change printer driver before doing the setup and then change back
again?

DM Unseen

  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Inexpecting slow execution when writing to .PageSetup.Leftfoot

No, because macro should be generic and we don't know which are the available
printer connected to a specific machine.
In addition I tried to set the ActivePrinter property of Application object
to "" but it seems that it's not possible...

"DM Unseen" wrote:

Maybe change printer driver before doing the setup and then change back
again?

DM Unseen




  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 233
Default Inexpecting slow execution when writing to .PageSetup.Leftfoot

Alan,

the only other option is to install some printer driver yourself and
use that.

use
http://www.codeguru.com/forum/showth...oto=nextoldest
and
http://www.frogmorecs.com/arts/using...ic_driver.html

DM Unseen

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
PageSetup.LeftFooter only on last Page Andy Excel Worksheet Functions 3 December 6th 04 01:53 PM
PageSetup calls are slow Stan Excel Programming 3 July 1st 04 05:03 PM
Unable to Set LeftFooter Property Class PageSetup (ASP) fredlankovich Excel Programming 0 June 23rd 04 07:56 PM
PageSetup is slow Christof DB Excel Programming 4 December 5th 03 04:09 PM
PageSetup slow Oliver Chiu Excel Programming 1 July 10th 03 02:06 PM


All times are GMT +1. The time now is 05:50 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"