Hi,
Can someone please help with the following:
While running a userform, I need to create a new worksheet (Newname), copy some data onto it from a template sheet ("Template"), set the display size of the new worksheet to 80%, and then set a control sheet ("Control")as the active sheet to be displayed when the userform closes.
The VBA code works fine, but while the process is happening, the worksheets Newname and "Template" open and appear in the background. I have tried to use Application.Screenupdating to suppress this, but they still appear.
I would like not to see these worksheets at all, & not have the screen flash during this operation.
------------------------------------------------------------
Application.ScreenUpdating = False
Set NewWorksheet = Worksheets.Add
NewWorksheet.Name = Newname
NewWorksheet.Move after:=Sheets(Sheets.Count)
NewWorksheet.Select
ActiveWindow.Zoom = 80
Worksheets("Template").Range("A1:CS51").Copy _
(Worksheets(Newname).Range("A1:CS51"))
Worksheets("Control").Activate
Application.ScreenUpdating = True
-------------------------------------------------------------------
Any assistance would be appreciated,
Linus
Can someone please help with the following:
While running a userform, I need to create a new worksheet (Newname), copy some data onto it from a template sheet ("Template"), set the display size of the new worksheet to 80%, and then set a control sheet ("Control")as the active sheet to be displayed when the userform closes.
The VBA code works fine, but while the process is happening, the worksheets Newname and "Template" open and appear in the background. I have tried to use Application.Screenupdating to suppress this, but they still appear.
I would like not to see these worksheets at all, & not have the screen flash during this operation.
------------------------------------------------------------
Application.ScreenUpdating = False
Set NewWorksheet = Worksheets.Add
NewWorksheet.Name = Newname
NewWorksheet.Move after:=Sheets(Sheets.Count)
NewWorksheet.Select
ActiveWindow.Zoom = 80
Worksheets("Template").Range("A1:CS51").Copy _
(Worksheets(Newname).Range("A1:CS51"))
Worksheets("Control").Activate
Application.ScreenUpdating = True
-------------------------------------------------------------------
Any assistance would be appreciated,
Linus