SPEED UP???

julxl

Board Regular
Joined
Mar 16, 2005
Messages
60
Hi,

any suggestion to speed this code up?
Code:
Private Sub CommandButton3_Click()
Application.ScreenUpdating = False

Sheets("Invoice").PageSetup.PrintArea = ("A1:H58")

Sheets("Invoice").PageSetup.RightFooter = "Customer Copy"
Sheets("Invoice").PrintOut

Sheets("Invoice").PageSetup.RightFooter = "EAT Copy - Sales "
Sheets("Invoice").PrintOut

Sheets("Invoice").PageSetup.RightFooter = "EAT Copy - Account "
Sheets("Invoice").PrintOut

Sheets("DeliveryOrder").PageSetup.PrintArea = ("A1:G56")

Sheets("DeliveryOrder").PageSetup.RightFooter = "EAT Copy - Sales "
Sheets("DeliveryOrder").PrintOut

Sheets("DeliveryOrder").PageSetup.RightFooter = "Customer Copy"
Sheets("DeliveryOrder").PrintOut

Application.ScreenUpdating = True

End Sub

normally it would take 40seconds :(, thanks in advance
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Can't see much you can do to that to be honest. This is just a little tidy up:
Code:
Private Sub CommandButton3_Click()
Application.ScreenUpdating = False
With Sheets("Invoice")
    .PageSetup.PrintArea = ("A1:H58")
    .PageSetup.RightFooter = "Customer Copy"
    .PrintOut
    .PageSetup.RightFooter = "EAT Copy - Sales "
    .PrintOut
    .PageSetup.RightFooter = "EAT Copy - Account "
    .PrintOut
End With
With Sheets("DeliveryOrder")
    .PageSetup.PrintArea = ("A1:G56")
    .PageSetup.RightFooter = "EAT Copy - Sales "
    .PrintOut
    .PageSetup.RightFooter = "Customer Copy"
    .PrintOut
End With
Application.ScreenUpdating = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,557
Members
449,088
Latest member
davidcom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top