I have a macro that replaces contents in about 120 cells on a sheet and 12 sheets in a workbook. When I run the macro I get a message box File not Found. The File is there and and when I select it and hit OK, it will replace the contents in the first cell. But I have to hit OK to replace each cell. I want it to run through all sheets. It worked on my old computer, but doesn't on my new computer. I tried it on 2 other computers with the same results. Here is cell contents: C:\Bakery 2008\[DAILY-08.xls]JANUARY DAILY'!$CI$1 I want to change to C:\Bakery 2009\[DAILY-09.xls]JANUARY DAILY'!$CI$1
Daily-09.xls is another workbook and the file it is saying it can't find. Below is the Macro: Thanks
Sub InvoiceChangeYear()
'
' InvoiceChangeYear Macro
' Macro recorded 12/4/2007 by Keith A Roberts
'
'
ActiveSheet.Unprotect
Cells.Replace What:="Bakery 2008\[DAILY-08", Replacement:= _
"Bakery 2009\[DAILY-09", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase _
:=False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
Sub InvoiceChangeYearAll()
'
' InvoiceChangeYearAll Macro
' Macro recorded 12/4/2007 by Keith A Roberts
'
'
Application.Run "'AMERICAN-LEGION-INV-08.xls'!InvoiceChangeYear"
Sheets("February Invoice").Select
Application.Run "'AMERICAN-LEGION-INV-08.xls'!InvoiceChangeYear"
Sheets("March Invoice").Select
Application.Run "'AMERICAN-LEGION-INV-08.xls'!InvoiceChangeYear"
Sheets("April Invoice").Select
Application.Run "'AMERICAN-LEGION-INV-08.xls'!InvoiceChangeYear"
Sheets("May Invoice").Select
Application.Run "'AMERICAN-LEGION-INV-08.xls'!InvoiceChangeYear"
Sheets("June Invoice").Select
Application.Run "'AMERICAN-LEGION-INV-08.xls'!InvoiceChangeYear"
Sheets("July Invoice").Select
Application.Run "'AMERICAN-LEGION-INV-08.xls'!InvoiceChangeYear"
Sheets("August Invoice").Select
Application.Run "'AMERICAN-LEGION-INV-08.xls'!InvoiceChangeYear"
Sheets("September Invoice").Select
Application.Run "'AMERICAN-LEGION-INV-08.xls'!InvoiceChangeYear"
Sheets("October Invoice").Select
Application.Run "'AMERICAN-LEGION-INV-08.xls'!InvoiceChangeYear"
Sheets("November Invoice").Select
Application.Run "'AMERICAN-LEGION-INV-08.xls'!InvoiceChangeYear"
Sheets("December Invoice").Select
Application.Run "'AMERICAN-LEGION-INV-08.xls'!InvoiceChangeYear"
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("January Invoice").Select
Application.Run "'AMERICAN-LEGION-INV-08.xls'!InvoiceChangeYear"
End Sub
Bookmarks