I would like to copy a template sheet to the left of itself to be populated by a report generator. This all works fine.
However when it comes to the sheet copying line (shown below) their is a flash as excel appears and then disappears - though occasionally I am left with a blue, partially filled in excel window.
I already have Application.ScreenUpdating
set to false and .Visible
is also set to false, and I reset them everytime to minimise the disruption. This flash is really annoying. Is there anyway of preventing it?
' create new sheet from template sheet
shtDeliveryVariance.Copy Before:=shtDeliveryVariance
Set shtVariance = Sheets(shtDeliveryVariance.Index - 1)
shtVariance.Name = "Delivery Variance " & Format(nSheetNumber, "000")
' minimise the flashes
Application.Interactive = False
Application.ScreenUpdating = False
Application.Visible = False
Update: If I use Set shtVariance = Sheets.Add
I don't get the flash, but I lose all the pretty formatting.