G
Guest
Hello - I have a VERY simple macro that is supposed to unprotect a worksheet,
select all the visible worksheets and then copy/value paste all the cells in
each visible worksheet. Then it should re-protect one of the worksheets.
I've tried stepping through the macro and it does everything fine until the
first worksheet is copy/value pasted and then it clocks.
Here is the code:
Sub ValueCopy()
'
' ValueCopy Macro
' Macro recorded 10/22/2007 by Jim
Sheets("Welcome").Unprotect Password:="3033563"
Dim ws As Worksheet
For Each ws In Sheets
If ws.Visible Then ws.Select (False)
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues
Application.CutCopyMode = False
Next
Sheets("Welcome").Protect Password:="3033563"
End Sub
Any help would be appreciated.
select all the visible worksheets and then copy/value paste all the cells in
each visible worksheet. Then it should re-protect one of the worksheets.
I've tried stepping through the macro and it does everything fine until the
first worksheet is copy/value pasted and then it clocks.
Here is the code:
Sub ValueCopy()
'
' ValueCopy Macro
' Macro recorded 10/22/2007 by Jim
Sheets("Welcome").Unprotect Password:="3033563"
Dim ws As Worksheet
For Each ws In Sheets
If ws.Visible Then ws.Select (False)
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues
Application.CutCopyMode = False
Next
Sheets("Welcome").Protect Password:="3033563"
End Sub
Any help would be appreciated.