JimS
01-26-2011, 01:36 PM
How can the following few lines of code be converted so that the worksheet does not have to be Activated?
JimS
Worksheets("Data1").Select
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Cells.Select
Selection.Columns.AutoFit
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
True, AllowFormattingColumns:=True, Password:=""
JimS
Worksheets("Data1").Select
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Cells.Select
Selection.Columns.AutoFit
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
True, AllowFormattingColumns:=True, Password:=""