Workbook backup macro

F

Fan924

Looking to create a workbook backup macro. I want to copy active
workbook to a new workbook name. The backup workbook should be passive
"without macros", "without formulas" & "without charts". Sample code I
tried does delete macros as it copies but not worksheet code.
 
R

ryguy7272

Backup before running any new macro for the first time ever (in case the end
results are unintended):

Sub LoopingMacro()

Dim WS_Count As Integer
Dim I As Integer
WS_Count = ActiveWorkbook.Worksheets.Count

' Begin the loop.
For I = 1 To WS_Count

Worksheets.Select
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

Next I

End Sub

Regards,
Ryan---
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top