0

I have some code that looks something like this:

 sub my_code()

Application.ScreenUpdating = False 

    'do lots of my things on my active workbook

    'then I create a new workbook and do stuff on that
    'looks like this:

    filePath = ThisWorkbook.Path & "\"
    fileName = Format(Date, "YYYY-MM-DD") & ".xlsx"    
    fileFullPath = filePath & fileName     
    Set newBook = Workbooks.Add
    newBook.SaveAs fileFullPath
    ThisWorkbook.Sheets("Summary").Copy Before:=Workbooks(fileName).Sheets(1)
    newBook.Sheets("Summary").UsedRange.Copy

 Application.ScreenUpdating = True

End Sub

So as you can see I am trying to get rid of the flashing when the macro runs. The flashing does not occur when I am doing work on my active workbook, but as soon as I start doing work on the new workbook, the flashing starts again. Why is this occurring, how do I stop it?

a12345
  • 13
  • 2

0 Answers0