• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Application.screen updating - for copied sheet

vasim

Member
Hello,

As you can see in the below code, screen starts flickering as soon as a copy of sheet1 is created, but as I delete this sheet after the print, I don’t require it – not even want to give a hint about how the macro performs.


Any help will be appreciated.


Sub Macro1()

Application.ScreenUpdating = False

Sheets("Sheet1").Copy Before:=Sheets(2)

call macro 2

ActiveSheet.PrintOut Copies:=1, Collate:=True

ActiveSheet.Delete

Application.ScreenUpdating = True

End Sub


Regards,

Indian
 
Do you have other macro's in the Workbook or other Worksheets that have macros being executed by events due to what your macro is doing ?


You can disable other events from occurring whilst code is executing by using

[pre]
Code:
Application.EnableEvents = False

'your code

Application.EnableEvents = True
[/pre]
similar to Application.ScreenUpdating...
 
Thanks Hui,


I have other macros as well..however the problem is sheet1 is copied near about 20-22 times (has some charts in it) and each sheet is updated from a other macro (call macro used) and consumes sone time and then a print out of 20-22 sheets, delete all 20-22 sheets and sheet1 is visible.....one of the main reason for this is to reduce the file size.


What I want to do is all the working should not be displayed about the copied worksheet.Hope I am clear...
 
I mean the screen flickers and shows every sheet copied then the macro running - the visibility of this should be avoided
 
Back
Top