error opening workbook

C

clarknv

I keep getting an error when I open a workbook stating that it is unable to
open a different file. I thought the problem began when I tried to copy a
macro from the other file into this one. I thought that by recreating the
document, I would get rid of the error. The macro originally copied to
document so that it would archive a summary page. The summary page
automatically updates every day using vlookups). Here is my code:

Sub Archive()
'
' Keyboard Shortcut: Ctrl+n
'
Worksheets("Summary").Unprotect

Sheets("Summary").Select
Sheets("Summary").Copy After:=Sheets("Summary")
Sheets("Summary (2)").Select
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

Range("D11").Select

Worksheets("Summary").Protect
End Sub

I have looked under tools/options and in the vba window to see if the file
that I am working in is somehow pointing to the other file but I am not sure
that I am looking for the right thing. I just need to not get the error when
I open the file. Please help!
 

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