View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
clarknv clarknv is offline
external usenet poster
 
Posts: 10
Default Macro to copy worksheet

I have a Summary worksheet that updates daily using several vlookup formulas.
I created a macro that would archive this information. In the macro, I
first make a copy of the summary worksheet. Then on the copy, I copy/paste
special the values and formats onto the worksheet to make sure that I get
only the values and not the vlookup formulas.

The problem is that when I go to run the macro the next day, it creates a
copy of the wrong worksheet. I need it to create a copy of the Summary
worksheet. Here is the code for the macro.


Sub Archive()
'
' Archive Macro
' Macro recorded 6/12/2007 by Nekiah V. Jackson
'
' Keyboard Shortcut: Ctrl+b
'
Sheets("Summary").Select
Sheets("Summary").Copy Befo=Sheets(5)
Sheets("Summary (2)").Select
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("D11").Select
End Sub